Computing.Net > Forums > Unix > Awk and shell scripting

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 and shell scripting

Reply to Message Icon

Name: burchracer
Date: June 24, 2009 at 14:12:42 Pacific
OS: AIX535
Subcategory: Software Problems
Comment:

Here's my problem. I'm trying to read a network tunable setting , verify it is the right setting and then show it as pass or fail by assigning it a value of 0 for fail and 1 for pass. here is what I have so far and it almost works but I' m missing something. Any help would be greatly appreciated.

TEST: Unix-Review Global Network Options
DO no -a | awk -F"=" '/tcp_ndebug/ && $2==100 '
#IF OUTPUT echo [[ $2 -eq 100 ]]
THEN
1 PASS Setting is correct
ELSE
1 FAIL Setting is incorrect
ENDIF

the problem is if I change the fail usint hte no command, this test always passes.. I tried a conditional statement which is commented out and it gives the same solution.

I would be very grateful if someone could show me what I'm missing. Thanks in advance for any help.



Sponsored Link
Ads by Google

Response Number 1
Name: ghostdog
Date: June 24, 2009 at 18:08:48 Pacific
Reply:

this looks familiar. you have got your solution from another forum correct? describe your problem in that forum so i can try to help.

GNU win32 packages | Gawk


0
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: Awk and shell scripting

sed and shell script question www.computing.net/answers/unix/sed-and-shell-script-question/4472.html

awk in shell script www.computing.net/answers/unix/awk-in-shell-script/6200.html

Unix, Shell Script, awk & variables www.computing.net/answers/unix/unix-shell-script-awk-amp-variables/5148.html