I'm trying to figure out how to build a small shell script that will find old .shtml files in every /tgp/ directory on the server and delete them if they are older than 10 days...
The structure of the paths are like this:
/home/domains/www.domain2.com/tgp/
/home/domains/www.domain3.com/tgp/... (1 Reply)
what will the cmd below do?
ls *.3
1 members mentions that to seek all permutations and combinations of the mp3 extension ill have to use curly braces, {} and not, .
what then will do? (13 Replies)
Just a quick question:
if I want to do a comparison with a wildcard in a shell script, do i just use '*'? Heres what I have:
elif ; then
continue
but that doesnt evaluate right. It tries to compare against the literal '/apps*' instead of anything that begins with '/apps' (2 Replies)
Hi, I have this code to search all "cif" files using wildcard
for file in *.cif
do
grep "Uiso" $file | awk '{ print $3, $4, $5 }' > tet
done
I get this error
"grep: *.cif: No such file or directory"
Please where am I going wrong!!!
Thank you in advance (6 Replies)
Can someone please explain the wildcards in this. How is this recursive? When I put this in my terminal it recursively displayed everything.
ls .* * (6 Replies)
Hi,
Can anyone help me how to use * in if statement.
File contains below
line1:a|b|c|Apple-RED|
line2:c|d|e|Apple-Green|
line3:f|g|h|Orange|
I need to find line by line 4th field contains 'Apple' or not.
Please help me at the earliest. (6 Replies)
I'm trying to make a small script to see if you say a specific word, in bash.
Here is my code so far :
if ]; then
echo "You typed Something Device Something"
fi
exit 0
It does not echo what it should, even if i type something along the lines of "random Device stuff"
Please help,... (2 Replies)
Hi Experts,
I want to use ls in the below form:
ls -l *.{txt,TXT} (working fine)
but when i am declaring a variable,
VAR="*.{txt,TXT}"
ls -l $VAR is not working. Please help.
Thanks. (4 Replies)
GNU grep with Oracle Linux 6.3
I want to grep for strings starting with the pattern ora and and having the words r2j in it. It should return the lines highlighted in red below.
But , I think I am not using wildcard for multiple characters correctly.
$ cat someText.txt
ora_pmon_jcpprdvp1... (3 Replies)
CD_numb is AM017
this code:
set the_Firstcom_CD to (do shell script "ls -d '/volumes/audioNAS/Firstcom/Access Music/' ") & CD_numb
gives me this:
"/volumes/audioNAS/Firstcom/Access Music/AM017"
the item I am looking for is AM017Q.
I can get the "*" syntax right so it never finder... (7 Replies)
Discussion started by: sbrady
7 Replies
LEARN ABOUT HPUX
unshar
UNSHAR(1) General Commands Manual UNSHAR(1)NAME
unshar - unpack a shar file
SYNOPSIS
unshar [ options ] [ file ... ]
DESCRIPTION
Unshar scans mail messages looking for the start of a shell archive. It then passes the archive through a copy of the shell to unpack it.
It will accept multiple files. If no files are given, standard input is used.
OPTIONS
Options have a one letter version starting with - or a long version starting with --. The exception is --help and --version, which does
not have a short version.
--version
Print the version number of the program on standard output, then immediately exits.
--help Print a help summary on standard output, then immediately exits.
-d DIRECTORY --directory=DIRECTORY
Change directory to DIRECTORY before unpacking any files.
-c--overwrite
Passed as an option to the shar file. Many shell archive scripts (including those produced by `shar' 3.40 and newer) accepts a -c
argument to indicate that existing files should be overwritten.
-e--exit-0
This option exists mainly for people who collect many shell archives into a single mail folder. With this option, `unshar' isolates
each different shell archive from the others which have been put in the same file, unpacking each in turn, from the beginning of the
file towards its end. Its proper operation relies on the fact that many shar files are terminated by a `exit 0' at the beginning of
a line.
Option -e is internally equivalent to -E "exit 0".
-E STRING --split-at=STRING
This option works like -e, but it allows you to specify the string that separates archives if `exit 0' isn't appropriate.
For example, noticing that most `.signatures' have a `--' on a line right before them, one can sometimes use `--split-at=--' for
splitting shell archives which lack the `exit 0' line at end. The signature will then be skipped altogether with the headers of the
following message.
-f--force
The same as -c.
SEE ALSO shar(1)DIAGNOSTICS
Any message from the shell may be displayed.
AUTHORS
The shar and unshar programs is the collective work of many authors. Many people contributed by reporting problems, suggesting various
improvements or submitting actual code. A list of these people is in the THANKS file in the sharutils distribution.
REPORTING BUGS
Report bugs to <bug-gnu-utils@gnu.org>. Please put sharutils in the subject line. It helps to spot the message.
September 10, 1995 UNSHAR(1)