10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Team,
Im new to shell scripting please help in below issue:
Considering scenario i have 1.sql,2.sql,3.sql and 4.sql . If my second script fails my loop should come out and should not execute 3.sql and 4.sql.
Here is my code.
#! /bin/bash
echo "exit" | user/password | grep Connected >... (4 Replies)
Discussion started by: preethi87
4 Replies
2. Shell Programming and Scripting
Ubuntu, Bash 4.3.48
Hi,
I have this input file:
a1:b2:c30:g4:h12:j7
and I want this output file:
a1=g4:b2=h12:c30=j7
I can do it this with this code:
awk -F':' '{print $1"="$4":"$2"="$5":"$3"="$6"}' INPUT > OUTPUTIn this case I have 6 columns, I calculate manually the half number of... (6 Replies)
Discussion started by: echo manolis
6 Replies
3. AIX
Hi,
I am executing a shell script on AIX box where I need to list all the files in the file system and then do some other tasks with them. I am able to do this successfully on HP-UX and Linux boxes but I get the following error after 10-15 seconds when I try to execute the script on an AIX box. ... (6 Replies)
Discussion started by: Adyan Faruqi
6 Replies
4. Shell Programming and Scripting
Script:
#!/sbin/sh
echo "Welcome to my First Script"
echo "Enter a word"
read PASS
if then
echo "You are correct"
elif then
echo "Thats incorrect"
else
echo "Bye"
fi
When i run the script shell says:
Syntax error at line 7:'elif' is not expected
I ran through some old posts and... (3 Replies)
Discussion started by: Amit Kulkarni
3 Replies
5. Shell Programming and Scripting
Hi All,
While running shell script i got following output.
interpreter "usr/bin/ksh" not found
sh: step1.sh: not found.
ldnhpux | oracle >echo $?
127
- Running command "which ksh" retruns "usr/bin/ksh".
- I found some information on web stating to remove extra carriage return chars,... (8 Replies)
Discussion started by: RuchirP
8 Replies
6. Shell Programming and Scripting
Hi,
I need to do the following but I don't know exactly what to do.
I need to monitor a file ... with tail -f for example, but I know that I could do it with awk, wait for a specific string ... , then perform an action, call a script, etc.
Let's say that my file name is test.txt , I need... (3 Replies)
Discussion started by: ocramas
3 Replies
7. Shell Programming and Scripting
Hi,
I want to run a crontab job on solaris10.5. I have configured the crontab accordingly
10 * * * * /scripts/dbalter.pl >> /scripts/cronout.txt.However this does not work .Then I go to /var/mail/root and find an error in the output:... (4 Replies)
Discussion started by: sonu2die4
4 Replies
8. UNIX for Dummies Questions & Answers
hi there
i write one awk script file in shell programing
the code is related to dd/mm/yy to month, day year format
but i get an error
please can anybody help me out in this problem ??????
i give my code here including error
awk `
# date-month -- convert mm/dd/yy to month day,... (2 Replies)
Discussion started by: Herry
2 Replies
9. Shell Programming and Scripting
Hi,
I have a cron job which executes daily once 9 PM.
The script is like
if
then
TYPE=OC
elif
then
TYPE=i
elif
then
TYPE=mmc
elif
then
TYPE=CB
elif
then
TYPE=oth
fi (1 Reply)
Discussion started by: surjyap
1 Replies
10. Shell Programming and Scripting
The requirement is to extract 9 fields randomly from a 13 field CSV file to make another CSV file. While doing that, the field 7 and 8 of input csv file should comeout as field 7 of output with the value as first charecters of both 7 and 8 fields of input file(CSV file).
Presently I am using... (1 Reply)
Discussion started by: mitte_dino
1 Replies