10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all,
I have following piece of code which is working fine if executed standalone -
date=$1
set -A max_month 0 31 28 31 30 31 30 31 31 30 31 30 31
eval $(echo $date|sed 's!\(....\)\(..\)\(..\)!year=\1;month=\2;day=\3!')
(( year4=year%4 ))
(( year100=year%100 ))
(( year400=year%400 ))... (7 Replies)
Discussion started by: ektubbe
7 Replies
2. Programming
hi all,
i have made a shell script and it runs until it reaches the if statement, doesn't the ! mean only if the command fails it will echo me that message and then exit
can anyone please help me what is wrong with my code?
many thanks,
rob
#!/bin/bash
echo "is this archive... (10 Replies)
Discussion started by: robertkwild
10 Replies
3. Shell Programming and Scripting
Hi folks,
A really dumb question as I've wasted far too long trying to get this to work.... (on RH bash)
I have an array:
m0='<hello>'
m0='<there>'
m0='<fred>'
v0='<goodbye>'
v0='<again>'
v0='<john>'
in my code I calculate the value of the variable to output and if I echo it, I... (2 Replies)
Discussion started by: say170
2 Replies
4. Programming
Hey so I've written a program and it crashes every time I run it. I tried placing breakpoints to see what was going but to my surprise they do not work! I've placed them anywhere and they do not stop the execution of the program.
In fact if I add code and hit rebuild it doesn't even build that... (1 Reply)
Discussion started by: Cambria
1 Replies
5. UNIX for Dummies Questions & Answers
Hi:
there is a shell script, with the name "foo", located in a bin directory. in the same time, there is an alias "foo='/path/bin/foo' ", just for convenience.
in my home directory, there is a different script with name "foo" too. (a modified version.)
while in my home directory, when I... (3 Replies)
Discussion started by: phil518
3 Replies
6. UNIX for Dummies Questions & Answers
when i started booting linux ,after sometime both the mouse and the keyboard are getting freeze and wont respond(also the system gets hanged and all the process running dont go forward) ,nothing seem to work.
Keeping in mind that it will work after sometime ,i waited for one hour also ,but... (1 Reply)
Discussion started by: sanjay.login
1 Replies
7. Shell Programming and Scripting
Hallo,
I need to test a String (a special ip number-string).
So I want to run that:
ipadress=172.0.0.0
# for debugging:
echo $ipadress | egrep -e '172\.?\.??\.??$'
# the test that doesnt work
if test -z `echo $ipadress | egrep -e '172\.?\.??\.??$'` != ""
then
echo "match"
else... (1 Reply)
Discussion started by: wiseguy
1 Replies
8. UNIX for Advanced & Expert Users
Hi
I tried to put a cron job which pipes the logfile appended to date +%d
but it didnt work .
anyone know how to make this happen
thanks in advance
-prasad (7 Replies)
Discussion started by: p4cldba
7 Replies
9. Shell Programming and Scripting
I am using an array (clmlist01). I have 61 of these and have 4 or more references to each one in a block of code that I do not want to have to hardcode. With that being said, I am creating a varible and going through a for loop to create the actually name of each array. The arrays would end up... (3 Replies)
Discussion started by: dsimpg1
3 Replies
10. Filesystems, Disks and Memory
Alright.
My neighbor kid brings me his iBook and says nothing works. He decided to move the file system to his likeness and that semed to create the problems. Now he doesn't have access rights to his home.
I have run fsck over and over again and I keep getting ** fs modified **
I have also... (0 Replies)
Discussion started by: maxwell
0 Replies
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 eparated by a colon (":") character. The --prefix option specifies the location
of the files.
AUTHOR
Andreas Gruenbacher <agruen@suse.de> (SuSE Linux AG)
perl v5.12.1 2010-07-05 GUARDS(1)