Hi all, I'm confused about the proper syntax for multi-conditional if then statements. I'm trying to set limitations on info input on the command line.. i.e.
if ] ;then
$x=$vr1
else
print "You have entered an invalid option."
Can someone please clue me in on what is wrong with my syntax;... (3 Replies)
Please help me. I have been doing this for several hours.
Here is the code
if then
echo a b c d >> file.txt
echo 1111 >> file.txt
fi
The reason I want the two echo is because I want these statements printed on multiple lines. I keep getting error .
First it tells me... (2 Replies)
Hi,
Hav automated a process, and it is working fine.
for first process alone
status = ` ps -ef |grep a `
if
then
echo " Success" > temp/logfile
else
echo " Failure" > temp/logfile
fi
Now I hav to write script to automated some 2 process and then send mail using cron..
... (5 Replies)
how can we execute multiple statements in
else condition
i have
if
then
statement
else
statements
fi
in else condition i have multiple statements
but it executing only one statement
is there any way to execute multiple statements (4 Replies)
Hi ,
I have a peculiar problem.
i have an if block like this
if ;
then
echo " todays date is " ${date} >> log_file
echo " file count is " $ count >> log_file
mv filename1 filename 2
else
echo "no files available ">> log_file
fi
the echo statement "no files available " is not... (2 Replies)
Hi All,
I need to check for 3 conditions and if all the 3 are not satified need to say that services are not running....
is the below code correct.
#********** Check to see if Service 1 is still running**************
if
then
echo "$datetimestamp: Service1 is not running" >>... (4 Replies)
Hi everyone,
May you help me with the correct syntax of the follow bash statements please
X=10
if ]; then
echo "The value is between 1 and 5"
for ((i=1;i<=${X})); do
echo $i
done
else if ]; then
echo "The value is between 6 and 10"
for ((i=1;i<=${X})); do
... (5 Replies)
I'm working on a script for class as a final project. We have to ask for values (city, state, zip) five times, but the state can only be MI, IN, IL, or OH. I'm trying to do this with a while loop inside of a while loop, but I have no idea how to do it properly.
Here's what I have so far:
... (3 Replies)
exmaple:
file1 and file2 has 1 bit
if
then
exit
else
send out email
fi
if
then
exit
else
send out email
fi
it exits the 1st if. did not continue with my 2nd if. thanks in advanced.
Please use CODE tags are suggested on every page when you post an item in... (7 Replies)
Hello,
I am new to scripting and I am trying to write a simple script that creates users and adds their passwords from two files; one a user list file and another a password list file.
For example, I have two files already.
$ cat file1
andy
stephane
aby
paul
$ cat file2
123
234... (4 Replies)
Discussion started by: FemoTheDon
4 Replies
LEARN ABOUT SUSE
xzcmp
XZDIFF(1) XZ Utils XZDIFF(1)NAME
xzcmp, xzdiff, lzcmp, lzdiff - compare compressed files
SYNOPSIS
xzcmp [cmp_options] file1 [file2]
xzdiff [diff_options] file1 [file2]
lzcmp [cmp_options] file1 [file2]
lzdiff [diff_options] file1 [file2]
DESCRIPTION
xzcmp and xdiff invoke cmp(1) or diff(1) on files compressed with xz(1), lzma(1), gzip(1), or bzip2(1). All options specified are passed
directly to cmp or diff. If only one file is specified, then the files compared are file1 (which must have a suffix of a supported com-
pression format) and file1 from which the compression format suffix has been stripped. If two files are specified, then they are uncom-
pressed if necessary and fed to cmp(1) or diff(1). The exit status from cmp or diff is preserved.
The names lzcmp and lzdiff are provided for backward compatibility with LZMA Utils.
SEE ALSO cmp(1), diff(1), xz(1), gzip(1), bzip2(1), zdiff(1)BUGS
Messages from the cmp(1) or diff(1) programs refer to temporary filenames instead of those specified.
Tukaani 2009-07-05 XZDIFF(1)