You have to be aware that your script is running some severe risks: create 2 or three files in a new empty directory (run "mkdir x ; cd x ; touch a; touch b; touch c") and then run
Code:
pmeter -c '*'
Do an "ls -l" before and after and notice what happens. I do hope you created a new directory for this - in this case just go one level up and remove it with "rm -rf x" instead of having to deal with "*.tar".
If you want to reduce the risk check your passed arguments before:
Code:
if [ \( ! -f "$2" \) -a \( ! -d "$2" \) ] ; then
echo "Error: only (regular) files or dirs allowed." > /dev/stderr
exit 1
fi
The "-f" asks if the contents of "$2" exists and is a regular file, the "-d" if it is a directory, the "-o" is a logical AND, the "!" is a logical NOT.
Hi
In one of the script I am seeing some thing like exit 7,exit 1,exit 2,exit 3,exit 9,exit6.What is the difference between all of this exit.Can anyone help here please (3 Replies)
Hello All,
I have a problem in counting number of process getting run with my current script name..
Here it is
ps -ef | grep $0 | grep -v grep
This display just one line with the PID, PPID and other details when i print it in the script.
But when I want to count the numbers in my... (11 Replies)
I come across an entry in cron which is in such:
0 * * * *
What is the first 0 indicating? 0 minute? meaning a script cron as such will run every minute? :confused: (2 Replies)
Good day, everyone!
Could anybody explain me the following situation.
If I'm running similar script:
Var="anna.kurnikova"
Var2="Anna Kurn"
echo $Var | tr -t "$Var" "$Var2"
Why the output is :
anna KurniKova
instead of Anna Kurnikova?
:confused:
Thank you in advance for any... (2 Replies)
I'm an intern at a company that recently bought out another business. In doing so, they inherited a unix system that contains files which they need to retrieve. No one in the company, including myself, really understands or knows unix so please respond with the true assumption that I'm a unix... (1 Reply)
I'm receiving an exit code 64 in our batch scheduler (BMC product control-m) executing a PERL script on UX-HP. Can you tell me where I can find a list of exit codes and their meaning. I'm assuming the exit code is from the Unix operating system not PERL. (3 Replies)
Hello All,
I like this forum btw, and have only been lurking for about a day.
Recently I purchased some new hardware (AMD Athlon 64 3200+ and a Asus K8V Deluxe Motherboard), and I want to find an OS that can take advantage of the 64 bit processor.
Basically, what are the differences... (2 Replies)