我有这样一个csv的logging:
"[email protected]","456281438","16274","782981244047720"," ","<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"" align=""center"" style=""font-size:0;""><tr>","","","","",""
我需要填写一个文件,直到达到指定的文件大小。 我会用一个简单的循环放在同一行。 有没有一种方法与回声只写这一行,包括每个"遇到?
如果我使用echo -e我得到了
eianni@ianni-desktop:~/Desktop$ echo -e "[email protected]","456281438","16274","782981244047720"," ","<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"" align=""center"" style=""font-size:0;""><tr>","","","","","" [email protected],456281438,16274,782981244047720, ,<table cellpadding=0 cellspacing=0 border=0 width=100% align=center style=font-size:0;><tr>,,,,,
您可以通过将整个参数封装在单引号中来防止bash处理引号。
echo -e '"0258327... .."",""'应该这样做。