10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I am trying to check if two input files exist before the rest of the scripts is run. Following is the code that I have but it gives me syntax error.
if
then
echo "File not found"
else
echo "File found"
fi (3 Replies)
Discussion started by: nua7
3 Replies
2. Shell Programming and Scripting
hello,
i'v trying to use the TEST command and i have some problems with it.
i am trying kill all proccess wich is greater than 25.
i started with - ps -f | grep -v TTY | awk '{print $4}'
but i dont know how to proceed from here..
10x a lot, Daniel. (11 Replies)
Discussion started by: dadiT
11 Replies
3. Shell Programming and Scripting
How to check weather a string is like test* or test* ot *test* in if condition (5 Replies)
Discussion started by: johnjerome
5 Replies
4. Shell Programming and Scripting
This is the code:
while test 1 -eq 1
do
read a
$a
if test $a = stop
then
break
fi
done
I read a command on every loop an execute it.
I check if the string equals the word stop to end the loop,but it say that I gave too many arguments to test.
For example echo hello.
Now the... (1 Reply)
Discussion started by: Max89
1 Replies
5. Shell Programming and Scripting
Hello again, I have a script on my media server that wakes up my backup server, performs an 'rsync' backup, then shuts the backup server down. Currently, I have it send the Wake on LAN packet, and sleep for 5 minutes, just to give the backup server time to boot (of course it doesn't take that long,... (11 Replies)
Discussion started by: vwgtiturbo
11 Replies
6. UNIX for Advanced & Expert Users
AIX, Solaris, Linux Test Environment Design Question
We want to set an AIX, Solaris & Linux test environment. Here are the hardware equipments:
(1) A Sunfire v100 (or v120), 1GB memory, two 36GB HDD.
(2) An IBM pSeries 7026, 1 GB memory, 4 9GB HDD.
(3) Five external HDD with SCSI... (1 Reply)
Discussion started by: aixlover
1 Replies
7. Solaris
AIX, Solaris, Linux Test Environment Design Question
We want to set an AIX, Solaris & Linux test environment. Here are the hardware equipments:
(1) A Sunfire v100 (or v120), 1GB memory, two 36GB HDD.
(2) An IBM pSeries 7026, 1 GB memory, 4 9GB HDD.
(3) Five external HDD with SCSI... (4 Replies)
Discussion started by: aixlover
4 Replies
8. Programming
I'm very new to C and could use a little help.
I'm testing to make sure the command is running as it's proper name, if not then fail.
if (strcmp(argv, "xinit") != 0) {
fprintf(stdout, "name = %s length = %d\n",argv,l);
usage(0);
}
This works if the command is... (3 Replies)
Discussion started by: nck
3 Replies
9. Shell Programming and Scripting
Assume $x equals "".
If I try:
if test -n $x
I get the "Expression syntax" error.
It works in Linux but not in unix bash. In unix bourne I get "test: argument expected" (4 Replies)
Discussion started by: lumix
4 Replies
10. AIX
Hi all,
I have the following script.Can somone explain what it does.Thanks in advance.
if test $# -lt 1
then
echo "Message"
exit 1
fi (2 Replies)
Discussion started by: sam_78_nyc
2 Replies