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)
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)
This might be a simple answer but I can't for my life figure it out. If I input "bat", how do I get the condition to pick it up with the wild card *at*.
#!/bin/bash
read -p "enter" BOO
if ; then
echo "you win"
else
echo "you lose"
fi (3 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 have got heaps of files (.pdf, .txt and .doc) files in one folder, i am making a program in PERL that helps me find the files i want easier using shell wildcard,
something like this!!
print "Enter a pattern: (must be in )";
$input = <STDIN>;
if (The input is in and valid wildcard... (3 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)
Hi Folks,
I had a requirement to replace a pattern a.*a with 'a' alone. I'm writing a sed command to do that. But I'm not able to work this out. Pls help me.
echo 'a123a456a789' | sed 's/a.*a/a/'
Expected o/p : a456a789
But actual o/p is a789. :confused:
how can write that... (6 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 LINUX
bzexe
BZEXE(1) General Commands Manual BZEXE(1)NAME
bzexe - compress executable files in place
SYNOPSIS
bzexe [ name ... ]
DESCRIPTION
The bzexe utility allows you to compress executables in place and have them automatically uncompress and execute when you run them (at a
penalty in performance). For example if you execute ``bzexe /bin/cat'' it will create the following two files:
-r-xr-xr-x 1 root bin 9644 Feb 11 11:16 /bin/cat
-r-xr-xr-x 1 bin bin 24576 Nov 23 13:21 /bin/cat~
/bin/cat~ is the original file and /bin/cat is the self-uncompressing executable file. You can remove /bin/cat~ once you are sure that
/bin/cat works properly.
This utility is most useful on systems with very small disks.
OPTIONS -d Decompress the given executables instead of compressing them.
SEE ALSO bzip2(1), znew(1), zmore(1), zcmp(1), zforce(1)CAVEATS
The compressed executable is a shell script. This may create some security holes. In particular, the compressed executable relies on the
PATH environment variable to find gzip and some other utilities (tail, chmod, ln, sleep).
BUGS
bzexe attempts to retain the original file attributes on the compressed executable, but you may have to fix them manually in some cases,
using chmod or chown.
BZEXE(1)