oh forgotten to add data can also split to more than 2 rows
e.g. A|Data1|Data2|Data3|Data4|Data5| A|Data1split^M data1split|Data2|Data3split^M data3split|Data4|Data5split^M data5split| A|Data1|Data2|Data3|Data4|Data5|
Side note: Web applications and all these 'new' XML seems to take us a huge step backways in terms of data validation at the UI to validate users' inputs don't they?
Hi..to remove ^M, give the command : sed -e 's/^M//g' filename you will have to write the control-M as follows : first press control-V,then control-M,this will show the correct control-M on the command line. For removing the linefeeds,try this : sed -e 's/.$//g' filename this will remove the last character from the line,which happens to be the line feed.
the .$ will remove the last character from each line.In your case,the last character will be the linefeed which will be removed by the sed command.In the case of converting from DOS to UNIX,the last character of the line will be the carriage return,which will be removed.
The information on Computing.Net is the opinions of its users. Such
opinions may not be accurate and they are to be used at your own risk.
Computing.Net cannot verify the validity of the statements made on this site. Computing.Net and Computing.Net, LLC hereby disclaim all responsibility and liability for the content of Computing.Net and its accuracy.
PLEASE READ THE FULL DISCLAIMER AND LEGAL TERMS BY CLICKING HERE