crasho2001
Technical User
If the line ends with ,\n , it should be replace to ,.
If the line ends with \n, no change should be done.
How can I do?
If the line ends with \n, no change should be done.
How can I do?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
sed -r ':b;/,$/{N;bb;};s/\n//g' /input/file
[gray]# or[/gray]
awk '{ORS=/,$/?"":"\n"}1' /input/file
sed ':b;/,$/{N;bb;};s/\n//g' bulk2
[gray]# or[/gray]
awk '{ORS=/,$/?"":"\n";print}' bulk2