i was going thru the part option and arguments. on this section i fail to understand the use of exit 0 in below example .
also, i got and when i use option c in the script. however directory created successful.
below command i use to create the dir .
and below is the error which i got
but i can see dir is created .
one more thing
why i am getting error when trying to create a file. ---------- Post updated at 04:26 PM ---------- Previous update was at 03:14 PM ----------
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
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:
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.
thx for your response.
what i was able to understand from your response is that, i was getting below error because there was no such file or dir .
however this time i make a file keto and dir qq and then run the script.
below is the command for file keto
o/p
below is the command for dir qq
o/p
Now my question is why i am getting a letter "a" in the output along with file or dir name .
i thing it should come back to the prompt.
-rw-r--r-- 1 khare guest 100 Oct 10 11:23 keto
-rw-r--r-- 1 khare guest 2048 Oct 10 11:23 keto.tar
drwxr-xr-x 2 khare guest 512 Oct 10 11:26 qq
-rw-r--r-- 1 khare guest 1536 Oct 10 11:26 qq.tar
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)