![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Formatting | mirusnet | Shell Programming and Scripting | 3 | 01-06-2008 08:38 PM |
| Formatting a report from 2 files | augustinep | Shell Programming and Scripting | 12 | 12-19-2006 11:54 AM |
| Formatting using awk | cdunavent | Shell Programming and Scripting | 2 | 03-18-2003 11:09 AM |
| formatting | tamemi | UNIX for Dummies Questions & Answers | 5 | 07-21-2002 06:03 AM |
| formatting | xeron | UNIX for Dummies Questions & Answers | 5 | 03-20-2002 08:33 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Formatting files
We currently use the following script to format a non formatted file to an 80 byte format (for grep purposes etc..) We need some assistance with converting the file back to a non formatted file with no carriage returns ( we want the file to be a continuous line)
#!/usr/local/bin/perl ($fn, $len) = @ARGV; open(IFN, "<$fn") || die "Fail to open $fn\n"; #open(OFN, ">$fn.$len") || die "Fail to open $fn.$len\n"; open(OFN, ">$fn.dat") || die "Fail to open $fn.$len\n"; while (sysread(IFN, $line, $len)) { print OFN "$line\n"; } close(IFN); close(OFN); Thanks in advance for your assistance |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
To remove all line breaks:
tr -d '\n' < inputfile |
||||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|