Search Results

Search: Posts Made By: sasikari
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
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
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
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

 
All times are GMT -4. The time now is 04:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy