It's because "$i" is initially undefined. Quoting it gets around this.
for i in `ls receive_dir`; do will produce an error if no files exist, and for i in *; do resolves to * if no files exist, and it seems a bit wasteful to scan a whole directory to look for a known file, so it's probably better just to check if the file exists.
I setup termios structure with IGNBRK is not set and BRKINT is set.
To allow the process to receive signals I call: fcntl(fd, F_SETOWN, getpid());
I have made a signal handler to catch all signals. I can catch SIGINT when pressing ctrl+c but when I send break signal over serial then it cannot... (13 Replies)
Hi All,
How can I trap a character press in the shell script.
For eg:- I have a script runinng a infinite loops , I will need to dispay menu asking for run process of to stop process and process stauts like we do in glance
I have seen the traping the signal in glance command, (8 Replies)
Hi,
My program A updates a log called logA.
I have a shell script S that is responsible to send emails reading from the log.
I want to trigger execution of the script whenever there is an update to the log.
Thanks in advance. (8 Replies)
Operating System: Solaris 10, Shell
We are outputting the results of our scripts to the stderr file. However we have encountered a problem where some of the lines in the file are truncated.
Is there a way to increase the terminal or column size within the script so that this does not... (4 Replies)
True if file exists and has been modified since it was last read.
if
then
command
else
exit
fi
i am on AIX5.3-10. it does not understand -N
any other way.
i can use -ot (file1 is older than file2), but prefer -N if possible. (3 Replies)
i want use ssh on the host01 to execute autoexec.sh on the host02 like following :
host01> ssh host02 autoexec.sh
autoexec.sh include nohup command like follwing :
nohup /home/jack/deletedata.sh &
after i execute ssh host02 autoexec.sh one the host01. i can't found deletedata.sh... (1 Reply)
while
do
if ;then
read driverName
else
driverName=""
fi
done
can anyone please explain what exactly is happening on 1st line...is it like the conditions being ORed...I have no clue about this. (4 Replies)
Need shell script to:
1/keep polling a directory "receive_dir" irrespective of having files or no files in it.
2/move the files over to another directory "send_dir".
3/the script should only stop polling upon a file "stopfile" get moved to "receive_dir". Thanks !!
My script:
until
do... (0 Replies)
Hi Team,
I m very new to shell scripting , i want to add following condition in my script .
Can anybody help me.
There are three port in My node "$port"
port_A
port_B
port_C
I Want to add following Conditions in my script.
If Node is connected to port_A and port_B script... (10 Replies)