:) have you tried awk... and pipe the actual start and end dates in the directory you're looking for when i go through my directories and look for certain matching files thats what i do
except I am not quite sure what you are asking for so I can't give an exact example
awk -f script file |... (0 Replies)
Hi. I've been playing around a bit. This isn't for any practical purpose-- it's really just a theoretical exercise. I wrote this little thing:
foreach num ( 6 5 4 )
awk -v "number=$num" 'BEGIN{for(x=0;x<$number;x++) printf "-"; printf "\n"}'
end
I would expect the following output:
... (3 Replies)
If there exists a field in stdin, print it, otherwise, print hello.....
These print nothing:
cat /dev/null | awk '{if ( length > 0 ) print $1; else print "hello"}'
cat /dev/null | awk '{if ( $1 ) print $1; else print "hello"}'But the scripts work if I run them directly in a terminal:
... (8 Replies)
hi guys,
i want to parse a file using public function, the file contain raw data in the below format i want to get the output like this to load it to Oracle DB
MARWA1,BSS:26,1,3,0,0,0,0,0.00,22,22,22.00
MARWA2,BSS:26,1,3,0,0,0,0,0.00,22,22,22.00
this the file raw format:
Number of... (6 Replies)
Hello all!
I have problem in hp-ux 11.11 in awk
I want to grep sar -d 2 1 only 3 column, but have error in awk in hp-ux 11.11
Example:
#echo 123 234 | awk '{print $2}'
123 234
The situattions in commands bdf | awk {print $5}' some...
In hp-ux 11.31 - OK!
How resolve problem (15 Replies)
So, I have an awk statement that does a little filtering and formats the output conveniently. Here's what I had originally:
<input> | awk -F "\t" 'BEGIN{OFS=","} {sub(" ","_",$2)} (NR == 1) || (substr($2,9,2) >= 19 && substr($2,1,7) == "2011-02") {print}'
That did what I wanted, except that... (2 Replies)
Heyas
Trying to parse a tempfile, but somehow i mess up.
To my understand, this should work...
Plain:
tail -n1 out.tmp
1 81.5M 1 1066k 0 0 359k 0 0:03:52 0:00:02 0:03:50 359k
I want to get the 81.5M, so i'd assume it'll be $2 for awk....
tail -n1 out.tmp | awk... (24 Replies)