Okay, well this is more or less my first attempt at writing a shell script.
Anyways, here's my code:
cd ${PATH}
if
then
rm ${FILE}
./anotherScript
else
exit 1
fi
exit 1
Anyways, it's a pretty simple script that is supposed to search for the... (4 Replies)
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)
Hello all,
I'm trying to automate an if statement in my Perl script. The script opens an input file for reading, checks each line in the file for a particular substring, and if it finds the substring, writes it to an output file.
There are approximately 200 different input files. Each has... (3 Replies)
How do I test multiple words in a string test like below:
if ]
then
print "You entered $TBS name.\n"
else
print "You entered an incorrect response.\n"
fi
This test does not work. I have tried different syntax versions. How does this work? And is there a better way to do it?
... (10 Replies)
Is it possible to test against a varible within a ranges in a if statement.
ex.
if ];then
echo "not in range"
else
echo "number within range"
fi (8 Replies)
Discussion started by: leemalloy
8 Replies
LEARN ABOUT DEBIAN
svsetup
SVSETUP(1) User Commands SVSETUP(1)NAME
svsetup - Service setup tool for daemontools
SYNOPSIS
svsetup [OPTION]... CMD SERVICE
DESCRIPTION
Service setup tool for daemontools
-u USER
Specify service user name (Default: root)
-l USER
Specify log user name (Default: root)
-n Do not setup logging with multilog
-e ETCDIR
Specify cfg directory (Default: /etc/sv/SERVICE)
-L LOGDIR
Specify log directory (Default: /var/log/sv/SERVICE)
-s SERVICEDIR
Specify service directory (Default: automatically
detected)
-d Delete service user on removal
-D Delete log user on removal
-h, --help
Display help and exit
-V, --version
Display version and exit
CMD Specifies action to perform:
CREATE Create new service
REMOVE Delete existing service
ENABLE Enable service
DISABLE
Disable service
SERVICE
Specifies the service name
NOTE: If you REMOVE a service and specify a service user (with -u) and/or a log user (with -l) these users (except root) are removed, too,
if you also specify the option -d and/or -D! This happens without any confirmation requests and the users are deleted even if they were not
created by svsetup!
If you create a new service a default run script is created. If there is already a run script in ETCDIR this existing runscript is used
instead.
REPORTING BUGS
Report bugs to Klaus Reimer <k@ailis.de>
COPYRIGHT
Copyright (C) 2000-2011 by Klaus Reimer
This is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2 of the License, or (at your option) any later version.
svsetup 0.6 January 2011 SVSETUP(1)