Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
awk shell scripting
Name: evan108 Date: March 15, 2004 at 12:42:30 Pacific OS: mac osx server CPU/Ram: mac osx server 1.5 gig
Comment:
is it possible with awk or grep (or some other unix tool) to stop the search of a text file after the number of results reaches a predifined number.
I am searching rather large files and would only like to capture the first 2000 or so results. Thus for speed resons i would like awk or grep to brake out of the loop when 2000 results are recieved.
Summary: Hi! I'm trying to use my shell script variables in my awk-line. Is not working! month3 is my variable and i'm aware that I can't use the $-prefix in awk. awk ´$2==$month3{printf ("%16d,%14.1f\n",i+1,\...
Summary: How do i transfer the value from a shell script to awk script... for example: echo "blah.. blah.." read x echo `ls -l | awk '{if (NR=x) print $9}' i'm trying to get the value of x to be insert to the ...
Summary: Hello, I want to give back the first 3 letters of my hostname to a variable in a shell script like this principle: N=awk'{printf substr(`uname -n`,1,3) };{exit}' but so it doesn't work. I have one err...