awk edit
this is a comma separated value text file, how do i remove the spaces before the commas
Quote:
|
This is from The GNU Awk User's Guide:
Quote:
|
Please use [code][/code] tags around your code and data, to preserve formatting and to improve readability. Please do not use quote tags, colors, or other fancy formatting.
Could you be a bit clearer about your requirements? Do you want to remove spaces only if they occur in front of a comma? What about the ones that appear after it? If it's ok to just delete all spaces from the file, tr is all that's required. Code:
tr -d ' ' <file Code:
sed 's/[ ]*,/,/g' file |
All times are GMT -5. The time now is 12:14 AM. |