Skip to content

Tag: bash

Remove extra quotation marks in the grep output

the above cammand is used to get an http link example: www.224.ngrok.io but the output is say www.224.ngrok.io” How can I remove the extra ” at the end? I tried editing the ” from the grep command but it doesn’t work. Answer You can use positive lookahead: (?=”)matches the &#8221…

bash list postgresql databases over ssh connection

I am doing some work on a remote Postgresql database. When I log into the server this command works on bash: $ psql -c “l” Remote login over ssh is possible using: But why doesn’t it work from this command? This is working, also “psql -l” but I don’t understand why I have t…

Use bash -s with other arguments

I have install.sh script which is located in server. I want to write one line code to download and run the script. Everything works fine until I am trying to set arguments It can’t recognize ‘-p’ as an argument but ‘abc’ can. How to set arguments in this situation starting with &…