Are you sure you are having the file "name" and/or "/home/name" ?
better remove the -s option just for testing so-that you can see what is going wrong there.
Last edited by clx; 07-07-2010 at 03:10 AM..
Reason: typo
Just guessing, but it looks like you're trying to determine if $1 is a full (absolute) path (and if so, echo "Wrong, full path"), or a relative path (and if so, echo 1 according to your code?)
try this:
result:
If you want it to reject anything with a slash (/), as opposed to just starting with slash (ie: blah/foo in last example), then change the line to:
hi all,
i want to make a bash script so it can monitor directory sizes ie if it stays the same size (for a certain time) i want it to run the script but if there still copying and the directory increases in size do not run the script
i have heard "inotifywait" can do this, but theres... (7 Replies)
Hi,
I want to read file multiple times. Right now i am using while loop but that is not working.
ex.
While read line
do
while read line2
do
echo stmt1
#processing some data based on data.,
done < file2.txt
done < file1.txt # This will have 10... (4 Replies)
Hello All,
Maybe I'm Missing something here but I have NOOO idea what the heck is going on with this....?
I have a Variable that contains a PATTERN of what I'm considering "Illegal Characters". So what I'm doing is looping
through a string containing some of these "Illegal Characters". Now... (5 Replies)
ok, so I have a shell script that can be called using the first argument ($1) or not. This argument is a word (Tim for example) and not an actual flag (-x for example). If I call the script with an argument and call the same script without one, it believes that I provided an argument. Note here... (2 Replies)
Hi ,
I am new to shell scripting. i have a requirement say i will receive a file in a directory say /xyz.if that file stays in that directory more than 30 min i need to get a mail to my outlook.this should run for every 20 min in crontab.
can anyone help me? (8 Replies)
I'm trying to understand if it's possible to create a set of variables that are numbered based on another variable (using eval) in a loop, and then call on it before the loop ends.
As an example I've written a script called question (The fist command is to show what is the contents of the... (2 Replies)