Search Results

Search: Posts Made By: aachave1
1,422
Posted By Don Cragun
Try: #!/bin/ksh ERE=${1:-"^G_TP"} ...
Try:
#!/bin/ksh
ERE=${1:-"^G_TP"}
file=${2:-"f16_may_25_16_23_04_fsw1952.txt"}

awk -F, -v ERE="$ERE" '
NR == 1 {
for(i = 1; i <= NF; i++)
if($i ~ ERE)
of[++nof] = i
}
NR < 3 {for(i...
5,305
Posted By Don Cragun
Anything that will always sort higher than any...
Anything that will always sort higher than any value that can appear in the time field you're processing. If you were processing dates of the form YYYY/MM/DD HH:MM:SS you might choose something like...
5,305
Posted By RudiC
Would this come close to what you want (may need...
Would this come close to what you want (may need some polishing):
awk '
NR == 1 {getline HD1 < F1
HD2 = $0
next
}

$1 >= T[1] {do...
5,305
Posted By stomp
Hmmm. Since you're not familiar with perl, a...
Hmmm. Since you're not familiar with perl, a solution won't be easy for you. One solution for the sorting problem is to insert a marker(and remove it later) at line1/file1, so header of file1 will...
5,305
Posted By stomp
After finally checking out your original try, I'm...
After finally checking out your original try, I'm realizing that creating an epoch timestamp is absolutely not necessary here. The date given in file1/file2 is sortable without transformation.

Ok....
5,305
Posted By stomp
Here another possibillity, a bit more stream...
Here another possibillity, a bit more stream oriented ...

perl -MTime::Local -pe '
BEGIN{$fc=1}
s#(([0-9]{4})/([0-9]{2})/([0-9]{2})...
Showing results 1 to 6 of 6

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