The UNIX and Linux Forums
Forum Home
Linux and Unix Man Pages
Search Forums
Search Community Posts
Today's Posts
Quick Links
Man Pages
RedHat Commands
OpenSolaris Commands
Linux Commands
SunOS Commands
FreeBSD Commands
All UNIX Man Pages
All Linux Man Pages
Full Man Repository
Login or Register to Ask a Question and Join Our Community
Search Forums
Show Threads .
Show Posts
Tag Search
Advanced Search
Quick Links
Contact Us
Forum Rules
Today's Posts
FAQ
Pictures & Albums
All Albums
Miscellaneous
What is My IP
Whois
Mark Forums Read
Search Results
Showing results 1 to 4 of 4
Search took
0.02
seconds.
Search:
Posts Made By:
sasikari
Forum:
Shell Programming and Scripting
07-14-2011
5
Ignore Header and Footer and Sort the data in fixed width file
11,212
Posted By
zaxxon
There is 3 commands producing output so you would...
There is 3 commands producing output so you would have to redirect 3 times:
echo $H > newfile; sed '1d;$d' infile| sort -t'|' -k1.15,1.17 >> newfile; echo $T >> newfile
You could...
Forum:
HP-UX
10-27-2010
8
How to remove new line character and append new line character in a file?
16,263
Posted By
ctsgnb
/usr/xpg4/bin/grep -vE "^[:blank:]*$" inputfile...
/usr/xpg4/bin/grep -vE "^[:blank:]*$" inputfile remove blank lines
sed 's|^\([0-9]\)|:\1|;s|\([0-9]\)$|\1:|' add ":" at beginning of line starting with a number and at the end of lines ending with...
Forum:
HP-UX
10-27-2010
8
How to remove new line character and append new line character in a file?
16,263
Posted By
k_manimuthu
use strict; use warnings; undef $/; my...
use strict;
use warnings;
undef $/;
my $file_name="unix.txt";
open (FIN, "$file_name");
my $file=<FIN>;
close (FIN);
$file=~ s{([^,]+,){3}\w+}{&clean_up($&)}ges;
open (FOUT,...
Forum:
HP-UX
10-26-2010
8
How to remove new line character and append new line character in a file?
16,263
Posted By
ctsgnb
sed 's: *\\n *: :g;s: *, *:,:g' infile This...
sed 's: *\\n *: :g;s: *, *:,:g' infile
This would also remove space touching coma.
or
sed 's:\\n: :g;s: *: :g' infile
s substitute
: separator
\\n pattern to replace (the \ is used to...
Showing results 1 to 4 of 4
Member Badges and Information Modal
×