Hi
I simply want to add space in a line with bash. For ex:
echo $id $idd xp$c >> ./mass.txt
should give something alike:
ThanksCode:id idd xp and not: id idd xp
Hi
I simply want to add space in a line with bash. For ex:
echo $id $idd xp$c >> ./mass.txt
should give something alike:
ThanksCode:id idd xp and not: id idd xp
Last edited by MikeCyber; August 17th, 2017 at 03:25 PM.
The forum has "code tags" - Adv Reply (# button) - or in the Advanced Editor - or am I missing the question completely?
So I was completely missing the point.Code:echo $id $idd xp$c >> ./mass.txt
You can just quote everything.
Code:echo "$id $idd xp$c " >> ./mass.txt
Last edited by TheFu; August 17th, 2017 at 03:56 PM. Reason: fixed.
or something like...Code:echo "$id $idd xp$c " >> ./mass.txt
depending on how many spaces you want where and whether you want data left or right justified within a field. See 'info printf' for details.Code:printf "%-10s, %7s %8s \\n" "$id" "$idd" "xp$c" >> ./mass.txt
Thanks. I'll try in the next days.
Last edited by MikeCyber; August 22nd, 2017 at 07:44 AM.
Bookmarks