Search Results

Search: Posts Made By: ananan
3,105
Posted By Don Cragun
If you want to print lines from a file that match...
If you want to print lines from a file that match any of the EREs stored one per line in a file named ERES, but stop using an ERE after it has matched 3 (or whatever value you assign to the maxp...
3,105
Posted By Aia
This is very limited and it works in this...
This is very limited and it works in this contrived case because the match is exactly the literal alternation of the regex. However, the purpose of regex is to represent patterns and they are not the...
3,105
Posted By RudiC
If you are using a Solaris/SunOS system, use...
If you are using a Solaris/SunOS system, use /usr/xpg4/bin/awk or nawk instead of awk.
3,105
Posted By RudiC
How about awk 'match ($0, PAT) &&...
How about
awk 'match ($0, PAT) && ++T[substr($0, RSTART, RLENGTH)]<4' PAT="abc|bcd|cde" file2
abc1
bcd1
abc2
abc3
bcd2
bcd3
cde1
cde2
cde3
1,935
Posted By RudiC
How about ps -p "25936" -o etime= | awk...
How about
ps -p "25936" -o etime= | awk -F"[-:]" '{print (NF==4?$1*86400:0)+(NF>2?$2*3600:0)+$(NF-1)*60+$NF}'
735251
Showing results 1 to 5 of 5

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