Domino on Linux/Unix, Troubleshooting, Best Practices, Tips and more ...

 
alt

Daniel Nashed

 

Bash command of the week: Find unmatched quotes in a shell script - very very helpful

Daniel Nashed  11 June 2022 09:56:13

There is always someone who might already have done, what you are looking for -- Specially on Linux
I found the following genius line via Google when I was looking for a unmatched quote in a bash script

This like gives you the line numbers where you have unmatched quotes:

tr -cd "\"\n" < install_dir_safelinx/entrypoint.sh | awk 'length%2==1 {print NR, $0}'

This really made my day!! Very very cool!!
-- Daniel

Links

    Archives


    • [IBM Lotus Domino]
    • [Domino on Linux]
    • [Nash!Com]
    • [Daniel Nashed]