07-25-2007
How to write if loop in unix
Hi Thanks to one who helped me to create a new thread
I am so new to unix and trying to learn the stuff
Thanks for all the help I am getting here
I wanted to execute if loop like
if( x=y || (x=z && x=q))
{
some statements
}
Can I get help how to do write the if loop in unix shell scripting
I know if it is for two like
if [[ x eq y || x eq z ]] but couldn't do it with the above requirement
Thanks in advance
PINKY
10 More Discussions You Might Find Interesting
1. Programming
Sorry for asking a very basic question.
How do i compile my c codes in UNIX.
That is how do i know whether any c compiler is there in my system?
If nothing is present where from do i get one and load into my system? (12 Replies)
Discussion started by: rraajjiibb
12 Replies
2. Shell Programming and Scripting
Below is part of a script i have written to loop through part of a port info file. How do i continue the script to get info for OS Device Name, manufacturer and then put information into an array?
HBA Port WWN: 10000000c9420b4b
OS Device Name: /dev/cfg/c10
Manufacturer: Emulex... (5 Replies)
Discussion started by: rcon1
5 Replies
3. Shell Programming and Scripting
Hi all..
I've written a script which reads all system backup information.
#!/bin/ksh
export ORACLE_SID=$1
export primaryhost=$2
export sid=`echo $ORACLE_SID| tr `
RESULTFILE=/oracle/PC9/backupstatus_prod.log
ssh -l ora${sid} ${primaryhost} "tail -1... (2 Replies)
Discussion started by: suri.tyson
2 Replies
4. Shell Programming and Scripting
unix script must do the fiollowing
open a file containing comma delimited records
> each record contains 10 fields
> removes the 2nd field and use that same field containing fields 2 to 10
the original record after fprocessing should containing fields 1 and 3
a new erecord must be... (10 Replies)
Discussion started by: dwightja
10 Replies
5. Shell Programming and Scripting
NEWBIE ALERT!
Hi,
I'm 1 month into learning Perl and done reading "Minimal Perl" by Tim Maher (which I enjoyed enoumously). I'm not a programmer by profession but want to use Perl to automate various tasks at my job. I have a problem (obviously) and are looking for your much appreciated help.... (0 Replies)
Discussion started by: jospan
0 Replies
6. IP Networking
Hi,
We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
Following is the program that i have written in cygwin. The redirection of the unfound $param1 to error.txt file doesnt work.Can any one help?
#!/usr/bin/sh
fname=$1
sed 's/ //g' "$fname" > fname1
while read i
do
echo $i > file1
#param1 is script name
... (1 Reply)
Discussion started by: janardhanamk
1 Replies
8. Shell Programming and Scripting
Hi All,
I have one variable "TABLE_LIST" having the values and each valeus i can run in for loop like below:
TABLE_LIST= abc,abcd,acbfd
i should write the for loop and use each value at a time .
Please help me
Thanking in advance ..............
Regards,
Dathu (4 Replies)
Discussion started by: pdathu
4 Replies
9. UNIX for Dummies Questions & Answers
I'm taking a unix class and need to countdown to 0 from whatever number the user inputs. I know how to do this with a while or until loop but using the for loop is throwing me off....
I know I can use an if-then statement in my for loop but can I include a while loop in my for loop? (3 Replies)
Discussion started by: xxhieixx
3 Replies
10. UNIX for Beginners Questions & Answers
I have if loop with multiple variable value check in if loop. How can i print only if loop satisfied variable and its value in shell script ? I dont want to check each variable in if loop. That makes my script larger.
if ]
then
echo "Only satisfied variable with value"
... (3 Replies)
Discussion started by: prince1987
3 Replies
LEARN ABOUT DEBIAN
iv_thread
iv_thread(3) ivykis programmer's manual iv_thread(3)
NAME
iv_thread_create, iv_thread_set_debug_state - ivykis thread convenience functions
SYNOPSIS
#include <iv_thread.h>
int iv_thread_create(char *name, void (*start_routine)(void *), void *arg);
void iv_thread_set_debug_state(int state);
DESCRIPTION
iv_thread_create is a wrapper around pthread_create(3) which will maintain an ivykis main loop reference in the calling thread (which must
be an ivykis(3) thread, i.e. have had iv_init(3) called in it) for as long as the created thread is alive.
Maintaining a reference on the calling thread's ivykis event loop makes sure that the calling thread will not return from its ivykis main
loop before the created thread exits, as that could cause cleanup still happening in the created thread to be interrupted when the calling
thread subsequently calls exit(3).
The created thread need not be an ivykis thread.
Enabling debugging by calling iv_thread_set_debug with a nonzero argument will print a debug message to standard error whenever a thread is
created via iv_thread_create, whenever a thread so created terminates normally by returning from its start_routine, self-terminates by
calling pthread_exit(3), or is successfully canceled by pthread_cancel(3), and whenever destruction of such a thread is signaled back to
the calling thread.
For inter-thread signaling, iv_thread uses iv_event(3).
SEE ALSO
ivykis(3), iv_event(3), exit(3), pthread_cancel(3), pthread_create(3), pthread_exit(3)
ivykis 2010-09-13 iv_thread(3)