Unfortunately, it is a variable number of items 22-41. So I need to remove the end of line for every line that has a comma. Thanks for the thought though. -Dan
Weeellllll, ok MS Word lets you replace comma + ^013 which takes a comma plus the carriage returns/line feeds/^M and leave just the comma and concatenates any line which had previously a comma (or any other character) and a new line. Sure takes a long time, and much CPU. At least it works.
Would still like to know how to do this in vi or vim, as I remember needing this before. Thanks, Dan
I know there's an example of something like it in the sed & awk book.
But this will work from the command line:
cat myfile | while read s
do
case "$s" in
*,) printf "%s" s;;
*) echo $s;;
esac
done