sed - Appending text at EOL not working -
i'm trying append string @ end of each line in file, it's not working. file has format
1992988282,78.93,sometext
and tried
sed -e 's/$/,2012-09-03/' sample.csv
but text getting appended , replacing characters @ beginning of line. have tried
awk '{ print $0 ",2012-09-03" }' < sample.csv
and i'm getting exact same problem.
sed -r 's/[[:cntrl:]]*$/,2012-09-03&/' sample.csv
so keep ended control char in place (unless want use without, last &
removed)
Comments
Post a Comment