02-22-2013
Yes, the $() is nicer, suggest the actual subshell, nests, and supports vi % end finder and similar GUI IDE tools. Just make your 'case' test entries not "xxx*)" as in old examples, but the perfectly legal and balanced "(xxx*)", so the % and such are not confused.
This User Gave Thanks to DGPickett For This Post:
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I am trying to think of a way to create user ids on multiple Linux systems in one fell swoop without logging onto each system indivually. Is there a way to do this with ssh commands? I don't want to use NIS/LDAP solution just a simple shell script utilitarian methodoloy would suffice. Also, I am... (1 Reply)
Discussion started by: darthur
1 Replies
2. UNIX for Dummies Questions & Answers
I've had Linux when I was young, on one of our first computers and learned it pretty quickly... However, I've been working on Windows for about 7 years now and just made the switch back to Linux, Mandrake 9.1. So I have some problem with creating new user accounts. I could create one, but once I... (3 Replies)
Discussion started by: Arendo
3 Replies
3. Shell Programming and Scripting
I am trying get "df -k" output from multiple hosts along with their hostnames via ssh, my script is appending the "df -k" output from all the nodes to a single file but not getting the hostnames for those nodes, just wondering how to pass more than one command via ssh or may be someone could come... (6 Replies)
Discussion started by: barkath
6 Replies
4. Shell Programming and Scripting
I have a directory full of zip files.
How would I write a bash script to enumerate all the zip files, remove the ".zip" from the file name, create a directory by that name and unzip each zip file into its corresponding directory?
Thanks!
Siegfried (3 Replies)
Discussion started by: siegfried
3 Replies
5. Shell Programming and Scripting
Hi,
Can someone help me with creating a bash shell script.
I need to create a script that gets a positive number n as an argument.
The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
Discussion started by: I-1
7 Replies
6. SuSE
Hi
I need to create a user who can have access on only one folder.
for example I created a user "test" . he should have access only on folder
/testfolder.
The problem is that the user will mostly use FileZilla to ftp his files in the testfolder.
In the fileZilla , i want him to be... (21 Replies)
Discussion started by: SystemEng
21 Replies
7. Shell Programming and Scripting
Hi Expert,
How to create a script to reboot multiple hosts in linux?
Thank you. (5 Replies)
Discussion started by: regmaster
5 Replies
8. Shell Programming and Scripting
I have a script on about 15 hosts that I need to run for each host whenever I want (not crontab). Problem is, this script takes 5-10 mins to run for each host. Is there a way I can run the script in parallel for all the hosts instead of 1 at a time? Also, I'm remotely running the script on the... (3 Replies)
Discussion started by: mrskittles99
3 Replies
9. Shell Programming and Scripting
I have a script to detect if a host is pingable or not. The problem is that I would like it to put the nonpingable hosts in one file and the pingable hosts in another. I have come up with this so far:
for ip in `cat /tmp/testlist2`; do ping -c 3 $ip >/dev/null && echo "$ip is up" || echo "$ip... (5 Replies)
Discussion started by: newbie2010
5 Replies
10. Shell Programming and Scripting
Hi everyone!
Some time ago, I had to check connectivity with a big list of hosts, using different formats (protocol://server:port/path/, server:port, ....).
I developed a script that checks the connectivity using different commands (ping, telnet, nc, curl).
It worked for me so I'm sharing it... (9 Replies)
Discussion started by: Fr3dY
9 Replies
LEARN ABOUT DEBIAN
guards
GUARDS(1) User Contributed Perl Documentation GUARDS(1)
NAME
guards - select from a list of files guarded by conditions
SYNOPSIS
guards [--prefix=dir] [--path=dir2:dir2:...] [--default=0|1] [-v|--invert-match] [--list|--check] [--config=file] symbol ...
DESCRIPTION
The script reads a configuration file that may contain so-called guards, file names, and comments, and writes those file names that satisfy
all guards to standard output. The script takes a list of symbols as its arguments. Each line in the configuration file is processed
separately. Lines may start with a number of guards. The following guards are defined:
+xxx Include the file(s) on this line if the symbol xxx is defined.
-xxx Exclude the file(s) on this line if the symbol xxx is defined.
+!xxx Include the file(s) on this line if the symbol xxx is not defined.
-!xxx Exclude the file(s) on this line if the symbol xxx is not defined.
- Exclude this file. Used to avoid spurious --check messages.
The guards are processed left to right. The last guard that matches determines if the file is included. If no guard is specified, the
--default setting determines if the file is included.
If no configuration file is specified, the script reads from standard input.
The --check option is used to compare the specification file against the file system. If files are referenced in the specification that do
not exist, or if files are not enlisted in the specification file warnings are printed. The --path option can be used to specify which
directory or directories to scan. Multiple directories are separated by a colon (":") character. The --prefix option specifies the
location of the files.
AUTHOR
Andreas Gruenbacher <agruen@suse.de> (SuSE Linux AG)
perl v5.14.2 2012-03-04 GUARDS(1)