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

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -