Shortcut in nano editor for adding quotation marks to every word beginning with $ in a bash script? -


I'm new to writing in Bash and I've just finished this long script but I have given the quotation marks to all Adding all the quotation marks by the variable hand starting with Unary operator $ will take some time. Can a small cut be used on it so that all the words in the text file begin with $ , find the quotation marks around them? So if a line appears in the file:

  dragon myProgue.py $ car1 $ car2 $ speed1 $ speed2  

then it will appear after the shortcut As

/ Pre>

I am writing scripts through Nano.

Use global search and replace with expression (\ $ \ w +) < / Code>.

  1. Switch to search and replace mode with c - << / code>.
  2. Switch to regex mode with Alt-R .
  3. Type the expression (\ $ \ w +) . Press enter.
  4. In the replacement expression type "\ 1" change the expression captured with citations.
  5. On mail, press A for everyone.

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

How to access user directory in lazarus? -

java - Gradle dependencies: compile project by relative path -