07-03-2006
Problem with executing a script scheduled in crontab
Hi
I have written a shell script(in Solaris) in which following logic is there.....
i=1
while read control
do
key[$i]=`echo $control | awk -F$DELIMITOR '{ print $1 }'`
echo "Key Values" ${key[i]}
i=`/usr/bin/expr $i + 1`
done < $CONFPATH/$CONFFILE
when i execute it at prompt it works fine...but when the same is scheduled in crontab it is giving errors like
/user1/asdf/source_code/listen_sch.sh: key[1]=PortNumber: not found
/user1/asdf/source_code/listen_sch.sh: bad substitution
/user1/asdf/source_code/listen_sch.sh: val[1]=2001: not found
any suggestions.....
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I have problem in executing a shell script. When the shell script is executed at the shell prompt the script works successfully but when the same script is run as a cron job it fails to execute the files called within the shell script.
I have scheduled the job in my crontab file as
... (6 Replies)
Discussion started by: forumthreads
6 Replies
2. Shell Programming and Scripting
Hi,
I have written a script for file scan :
#!/bin/sh
find . -name "common.log.diff" > /dev/null 2>&1
if ; then
cp common.log common.log.diff
diff common.log common.log.diff > DIFFERENCE.log
cp common.log common.log.diff
grep "ERROR" DIFFERENCE.log
if ; then
echo "1" >... (6 Replies)
Discussion started by: himvat
6 Replies
3. UNIX for Dummies Questions & Answers
Hi everyone
In an existing crontab script for the root user, I've added 5 new lines of code, however for some unknown reason, these lines of code were not executed.
Here is what I did
30 0 * * * ./usr/people/atlab/jamesgoh/disk_reader/disk_reporter /picnic
30 0 * * *... (6 Replies)
Discussion started by: JamesGoh
6 Replies
4. Windows & DOS: Issues & Discussions
hello everyone.
I created a java program that will pop up a dialog, and scheduled it as a task. Everything works fine except when the scheduled java program runs and the dialog pops up, there is another dos prompt (svchost.exe) hanging behind the dialog box and doesn't go anywhere until the java... (0 Replies)
Discussion started by: milhan
0 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have the below job scheduled in crontab. Can you please tell me at what interval this job is scheduled? Where is the name of the job defined here? I will definitely go through the UNIX documentation a little later, for the time being, please provide me few details on this. Thank you.
... (0 Replies)
Discussion started by: Dev_Dev
0 Replies
6. Red Hat
Hi all,
I'm working to a script with /bin/bash shebang.
The script works perfectly if I run from command line.
The script runs under a non root user and inside the commands are set with sudo command in a such a way they can be run under root, for example (first rows of the script):... (5 Replies)
Discussion started by: idro
5 Replies
7. Shell Programming and Scripting
i have a job scheduled in crontab. The problem is, it is not running automatically as per the time scheduled. But runs when executed manually. What would be the problem? Help me with this please. (6 Replies)
Discussion started by: Santhosh CJ
6 Replies
8. Shell Programming and Scripting
Hi Forum,
Good Day!
I have created an empty html file wtih permissoin 777
created shell script(with permission 777) , code is below.
#=======================start==============
. /data09/oracle/apps_st/appl/D_oraapp095.env
rm -rf /home/mnp/Test_log.txt
echo... (1 Reply)
Discussion started by: kartheekbk
1 Replies
9. UNIX for Beginners Questions & Answers
i have written one script which is working fine when i run it manually but giving error when i schedule it in crontab.
cat SUMMARY.sh
#!/bin/bash
DT1=`date +%Y%m%d`
echo "Off PP TT" >>summary_$DT1.txt
cat ues1.txt_$DT1 >>summary_$DT1.txt
cat ues2.txt_$DT1... (2 Replies)
Discussion started by: scriptor
2 Replies
10. UNIX for Beginners Questions & Answers
Hi,
We have created a script that's checks the latency of IIDR subscription by fetching details from a config file (that contains subscription details) and running the CHCCLP command. The out put is then concatenated in a csv file. Once all subscription details are saved the script send a mail... (7 Replies)
Discussion started by: ab095
7 Replies
talk(1) General Commands Manual talk(1)
Name
talk, otalk - talk to another user
Syntax
talk person [ttyname]
otalk person [ttyname]
Description
The command is a visual communication program which copies lines from your terminal to that of another user.
If you wish to talk to someone on your own machine, then person is just the person's login name. If you wish to talk to a user on another
host, then person is of the form :
host!user
or
host.user
or
host:user
or
user@host
The form user@host is perhaps preferred.
If you want to talk to a user who is logged in more than once, the ttyname argument may be used to indicate the appropriate terminal name.
When first called, it sends the message
Message from TalkDaemon@his_machine...
talk: connection requested by your_name@your_machine.
talk: respond with: talk your_name@your_machine
to the user you wish to talk to. At this point, the recipient of the message should reply by typing
talk your_name@your_machine
It doesn't matter from which machine the recipient replies, as long as his login-name is the same. Once communication is established, the
two parties may type simultaneously, with their output appearing in separate windows. Typing Ctrl-L will cause the screen to be reprinted,
while your erase, kill, and word kill characters will work in talk as normal. To exit, just type your interrupt character; then moves the
cursor to the bottom of the screen and restores the terminal.
Permission to talk may be denied or granted by use of the mesg command. At the outset talking is allowed. Certain commands, in particular
and disallow messages in order to prevent messy output.
In order to use the program with machines on your network that may be running earlier versions of ULTRIX, you must initiate a session with
the command (/usr/ucb/otalk) instead of the command You must also respond to a request from a machine running an older version of the pro-
gram with the command. See the Restrictions section.
Examples
The following example demonstrates how to use the command. In this case, user1, whose system (system1) is running ULTRIX V2.2 initiates a
session with user2, whose system (system2) is running ULTRIX V3.0. User1 types the following:
system1> talk user2@system2
The following message appears on the screen of user2:
Message from Talk_Daemon@system2 at 12:37 ...
talk: connection requested by user1@system1.
talk: respond with: otalk user1@system1
To establish the connection user2 follows the instructions from the Talk_Daemon and types the following at the system prompt:
system2> otalk user1@system1
Restrictions
The version of released with ULTRIX V3.0 uses a protocol that is incompatible with the protocol used in earlier versions. Starting with
ULTRIX V3.0, the program communicates with other machines running ULTRIX, V3.0 (and later), and machines running 4.3 BSD or versions of
UNIX based on 4.3 BSD.
The command is not 8-bit clean. Typing in DEC Multinational Characters (DECMCS) causes the characters to echo as a sequence of a carets (^)
followed by the character represented with its high bit cleared. This limitation makes unusable if you want to communicate using a language
which has DECMCS characters in its alphabet.
Files
to find the recipient's machine
to find the recipient's tty
See Also
mail(1), mesg(1), who(1), write(1), talkd(8c)
talk(1)