Quantcast
Channel: How to enclose in quotes if both single and double quotes are already used? - Unix & Linux Stack Exchange
Browsing latest articles
Browse All 6 View Live

Answer by Useless for How to enclose in quotes if both single and double...

Just $ cat >> ~/globalLog.txt <now type your command> echo "cat file2.txt | sed 's/"//g' > file3.txt ## Step 2 " <hit ctrl-d>

View Article



Answer by aecolley for How to enclose in quotes if both single and double...

There is a simple, systematic and POSIX-compliant way to quote any string. You only need to remember two rules: Quote apostrophes (single quotes) with a backslash like so: \' Quote everything other...

View Article

Answer by iruvar for How to enclose in quotes if both single and double...

You can entirely avoid the need to quote using here documents. Note that setting the label in single/double quotes(as in "EOF" in the example below) disables variable and command evaluation within the...

View Article

Answer by l0b0 for How to enclose in quotes if both single and double quotes...

You have many choices, and each of them can be convenient in different situations. Double quote the whole string as one, and escape the literal double quotes inside (easy to read if you have only one...

View Article

Answer by h3rrmiller for How to enclose in quotes if both single and double...

just escape the " like so: echo "cat file2.txt | sed 's/\"//g' > file3.txt ## Step 2 " >> ~/globalLog.txt

View Article


How to enclose in quotes if both single and double quotes are already used?

I don't remember the exact commands and tricks that I use sometimes which solves much of the work, so I try to log them into a file for future reference. What I typically do is just put whole command...

View Article
Browsing latest articles
Browse All 6 View Live




Latest Images