10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi there,
Now I'm facing error regarding running shell script via cron.
The shell script which is required to get value from database.
Below is the main part of shell script.
#/bin/bash
#connect to database(1)
db2 connect to $database user xxxx using yyyy
#set values from... (3 Replies)
Discussion started by: Rohan Kishibe
3 Replies
2. Shell Programming and Scripting
Dear All,
I have script.
Dest=""
IFS='
'
for translation in $(echo $MY_MAP)
do
t1=$(echo $translation | cut -d"=" -f1)
t2=$(echo $translation | cut -d"=" -f2| cut -d"," -f1)
if
then
Dest=$UNX/$u_product_path/$u_study_path/$UNXTR/$t2
break;
... (4 Replies)
Discussion started by: yadavricky
4 Replies
3. Shell Programming and Scripting
Hi,
I'm trying to do teh below thing.
I have a single script which uses 3 different parameters to do 3 different work like belwo.
test1.sh par1 -- it shuts down an instance
test1.sh par2 -- it shuts down an instance
test1.sh par3 -- it shuts down an instance
Now I created a script... (7 Replies)
Discussion started by: bhaski2012
7 Replies
4. Shell Programming and Scripting
Hi
We use "tcsh" shell . We do the following steps manually:
> exec ssh-agent zsh
> python "heloo.py" (in the zsh shell)
I am trying to do the steps above from a shell script
This is what I have so far
echo "Executing "
exec ssh-agent zsh
python "hello.py"
exit 0
Problem is... (5 Replies)
Discussion started by: heman82
5 Replies
5. Shell Programming and Scripting
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk... (2 Replies)
Discussion started by: Ashunayak
2 Replies
6. Solaris
I am using following code to connect to oracle database from solaris shell script. which will try thrice to connect the database ...at the 4rth atempt it will exir=t.
count=0
while ; do
sqlplus -s $usrname/$password@dbSID <<-EOF | tee $logfile
WHENEVER OSERROR EXIT 9;
WHENEVER SQLERROR... (4 Replies)
Discussion started by: millan
4 Replies
7. Shell Programming and Scripting
Does not work.
#!/usr/bin/perl
$etcdir = 'ls -l /etc';
print $etcdir;
#END
------------result--------
#perl -w abc123.pl
ls -l /etc
#
This method works.
#!/usr/bin/perl
$etcdir = system("ls -l /etc");
print $etcdir;
#END (2 Replies)
Discussion started by: dplinux
2 Replies
8. Shell Programming and Scripting
I'm trying to read a bunch of log files and output the lines that contain particular strings.
To accomplish this, I've been running the following from the command line:
find . -name "*" | xargs grep " " | grep " " > output.txt
Two grep statements are needed in case I'm looking for a... (3 Replies)
Discussion started by: Rally_Point
3 Replies
9. UNIX for Dummies Questions & Answers
hi
i have file extentioned with test.vbs. i am able to run this file n execute through command promt but i dont know how to run in shell script
example:
file name is test.vbs which contains
strSoundFile = "C:\windows\Media\Notify.wav"
Set objShell = CreateObject("Wscript.Shell")
strCommand... (5 Replies)
Discussion started by: atl@mav
5 Replies
10. Shell Programming and Scripting
cron job not running the sqlplus command in shell script but the shell script works fine from command line..
Cronjob:
5 * * * * /home/dreg/script.sh
script.sh:
#!/bin/ksh
/oracle/u000/app/oracle/product/10204/GEN/bin/sqlplus -s <user>/<pass>@<sid/home/dreg/sqlscript.sh
... (18 Replies)
Discussion started by: Ikea
18 Replies