Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Understanding Code in IF LOOP Post 302328868 by Ariean on Thursday 25th of June 2009 10:47:59 AM
Old 06-25-2009
Understanding Code in IF LOOP

Hello All,

I would like to know and understand the difference between the below 3 IF loops and also if possible what are the different other parameters i could use other than those mentioed in the below lF LOOP conditions, appreciate your help.

Quote:
if [ $? -ne 0 ] ; then
...some statements
fi
Quote:
if [ $? -eq 0 ] ; then
...some statements
fi
Quote:
if [ $# -eq 3 ] ;then
...some statements
fi
Thanks,
Sam.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Little Trouble Understanding some code...

Couple of questions as I try to decipher someones code who left... What would something coded like this do? IFS=: grep FIELD1 /Path/Path2/Param.fle | read LBL1 LBL2 USRID EADR SUBJ SERVERNAME CFGTBL DIR ERR=0 Param.fle contents.. FIELD1:FEI::FIELD2:dATAFIELD BATCH:MAIN SERVER......etc.. (2 Replies)
Discussion started by: NycUnxer
2 Replies

2. Shell Programming and Scripting

Need help in understanding thisperl code.

Can any body explains the under given lines of code i have difficulties in understanding it, my $errorlog = "/var/log/controler.log"; &initLanguage($language); &launchCbox(); sub launchCbox { ... (1 Reply)
Discussion started by: Raheel Hassan
1 Replies

3. Shell Programming and Scripting

Problems understanding example code

I am really new to UNIX and programming in general and so apologies if this thread is a bit simple. I have searched and found a piece of sample code for a training program I am currently undertaking, but seeing as I am relatively new, I dont completely understand how it works. Here is the... (1 Reply)
Discussion started by: Makaer
1 Replies

4. UNIX for Dummies Questions & Answers

Problems understanding example code

I am really new to UNIX and programming in general and so apologies if this thread is a bit simple. I have searched and found a piece of sample code for a training program I am currently undertaking, but seeing as I am relatively new, I dont completely understand how it works. Here is the... (6 Replies)
Discussion started by: Makaer
6 Replies

5. UNIX Desktop Questions & Answers

Understanding the code

hello all, May i know what is this "DEBUG_ME $DEBUG_CMD main" doing in the below code. I am confused with alias also "alias DEBUG_ME='#'". Thanks for your help. set -x alias DEBUG_ME='#' if ; then . /product/apps/informatica/v7/pc/ExtProc/debug.ksh "$1" fi # Declaring the... (1 Reply)
Discussion started by: Ariean
1 Replies

6. Shell Programming and Scripting

Help understanding Perl code.

Well, I found myself trying to fix some Perl code (Ive never done any Perl in my life) and I pinpointed the place where the bug could be. But to be sure I have to know what does a few line of code mean: $files_lim =~ (/^\d*$/) $files_lim =~ (/^\d*h$/)$files_age =~ s/h//The code where this was... (0 Replies)
Discussion started by: RedSpyder
0 Replies

7. Programming

Understanding perl code

What is the difference between the two statements below? A: $a->{"$fruit"}->{"$color"}->{size} = $size B: $size = $a->{"$fruit"}->{"$color"}->{size} Please assist. Thanks! (0 Replies)
Discussion started by: onlinelearner02
0 Replies

8. Shell Programming and Scripting

Help with perl code understanding

Hi, I need to understand below perl code, can some one advise me. perl -MDate::Parse -e'BEGIN{$main::now=time;$main::old=(time-60*30)}' -nE'if(/^(\w+\s+\d+\s+\d+:\d+:\d+)/) {$t=str2time $1; $t > $old && $t < $now && print}' (1 Reply)
Discussion started by: learnbash
1 Replies

9. Shell Programming and Scripting

[Solved] Help understanding this code!!

Hi guys, I am still learning awk and much apprecated to shed some light on the following: the questions asked is below! { total = i = 0 do { ++i total += $i } while ( total <= 100 ) print i, ":", total } File used: cat test.do 45 25 60 20 10 105 50 40 33 5 9 67 108 3 5 4 (2 Replies)
Discussion started by: Apollo
2 Replies

10. UNIX for Dummies Questions & Answers

Understanding bash code

I am not able to understand below line in unix bash shell.Could anyone explain what it will do result="${path1}/*${var1}*${var2}*wssreligibleitem*.csv" path1 is defined and it is a directory path var1 is defined and it holds string value like abc var2 is defined and it holds string value like... (6 Replies)
Discussion started by: vamsi.valiveti
6 Replies
FL-RECORD(1)							   Debian manual						      FL-RECORD(1)

NAME
fl-record - records a live funkload test using TCPWatch SYNOPSIS
fl-record [ options ] test_case DESCRIPTION
fl-record uses TCPWatch to setup a proxy server which is then used by a browser and records activities. It generates a Funkload script or a unit test if a name is passed to the script. OPTIONS
--version Show program's version number and exit --help, -h Show a help message and exit --verbose, -v Verbose output --port=PORT, -p PORT TCP port where the proxy listens (Defaults to 8090) --tcp-watch-input=TCPWATCH_PATH, -i TCPWATCH_PATH Path to an existing TCPWatch capture --loop=LOOP, -l LOOP Loop mode SEE ALSO
fl-build-report(1), fl-credential-ctl(1), fl-install-demo(1), fl-monitor-ctl(1), fl-run-bench(1), fl-run-test(1). AUTHOR
Funkload was written by Benoit Delbosc. This manual page was written by Jose Parrella <bureado@debian.org>, for the Debian project (but may be used by others). Debian Project 26 March 2009 FL-RECORD(1)
All times are GMT -4. The time now is 06:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy