Quote:
|
Originally Posted by yoavbe
Hi All,
Jim suggetsion: tr -s '\n' ',' < oldfile > tmpfile is almost perfect.
Its add an extra ',' at the end of the file:
'/ttt/aaa','/ttt/bbb','/ttt/ccc','/ttt/ddd','/ttt/eee',
Any suggestion how to remove it ?
Thank You !!!

|
Here's another way to do it:
Code:
set -A FILE $(cat text.file)
echo ${FILE[@]} | sed 's/ /,/g' > file.txt
Without the pipe to
sed, you'll get blank spaces in between values