Shell command not working as expected -
i trying write shell command append ',' @ end of each line , output result new file. have written following code-
sed -e 's/$/,/g' -e '$ s/,$//' name.txt > output the above code executes , places comma operator in new line, i.e. if input file is
aabbcc ddeeff the output shown is-
aabbcc , ddeeff instead of
aabbcc, ddeeff what changes should make expected output ? tried
awk '{print $0","}' name.txt > output but displays output file above.
Comments
Post a Comment