Search Results

Search: Posts Made By: nazeeb
5,992
Posted By nazeeb
Here is a way: First get the previous two...
Here is a way:

First get the previous two days


# suppose today is 20080229 (date + %Y%m%d)
# then to get two days before you can write

yesterday1=`TZ=$TZ+24 date +%Y%m%d`...
84,320
Posted By nazeeb
Hi krao, really appreciate your conecern. ...
Hi krao,

really appreciate your conecern.

the input is just a test file to get the output working on a trial and error basis:

filename: 1
content:


i tried so many things (some of which...
84,320
Posted By nazeeb
Thanks krao!!! awk -F, '{ print $1 >...
Thanks krao!!!

awk -F, '{ print $1 > "output_"$2".txt"}' 1


works fine!

But

nawk -FS=, '{ print $1 > "output_"$2".txt"}' 1


generates error :confused:



i think I'll manage...
1,576
Posted By nazeeb
something like this may help awk' ...
something like this may help


awk'
BEGIN{FS=" "}
/X/ { x_count+= $2 }
/Y/ { y_count+= $2 }
/Z/ { z_count+= $2 }
END {
printf ("X %d\n",x_count);
printf ("Y...
84,320
Posted By nazeeb
awk print redirection to variable file name
Hello,

i need to redirect the output of print to a variable file name:


#This is normal
awk '{ print $17 > "output.txt" }' input

#I need something like this
awk '{ print $17 >...
Showing results 1 to 5 of 5

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