Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this record of a csv:

"","456281438","16274","782981244047720"," ","<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"" align=""center"" style=""font-size:0;""><tr>","","","","",""

I need to fill a file until I reach a specified size of the file. I would use a simple loop putting in append the same row. Is there a way with echo to just write this line including every " encountered?

If I use echo -e I got

eianni@ianni-desktop:~/Desktop$ echo -e "","456281438","16274","782981244047720"," ","<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"" align=""center"" style=""font-size:0;""><tr>","","","","","",456281438,16274,782981244047720, ,<table cellpadding=0 cellspacing=0 border=0 width=100% align=center style=font-size:0;><tr>,,,,,
share|improve this question
up vote 2 down vote accepted

You can prevent bash from processing the quotes by wrapping the whole argument to echo in single-quotes.
echo -e '"0258327... .."",""' should do the trick.

share|improve this answer
lika a charm, thanks – dierre Apr 2 '12 at 16:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.