On 02/12/2017 08:06 PM, bruce wrote:
Thanks for the delete replies..
Got a quick sed question now..
head -2 sed.dat
want to simply truncate/search/replace the end of each line starting
with the ","
the following isn't working
sed -i 's/\,+\$//' sed.dat
sed -i 's/\,+$//' sed.dat
I'm sure it's simple/trivial...
users mailing list -- users(a)lists.fedoraproject.org
To unsubscribe send an email to users-leave(a)lists.fedoraproject.org
sed 's/,[0-9]\+$//' < sed.dat
which removes a comma followed by 1 or more digits from the end of the
line. Or if you don't care what comes after the comma, then
sed 's/,.*$//' < sed.dat
will remove the comma and anything after it.