10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi All,
I am trying to write a shell script to check if a command executed successfully or not in rhel 7 and finding the installed tomcat version.
I am using below script.
var4=$(find / -name "catalina.jar" ! -size 0 |egrep -v... (6 Replies)
Discussion started by: sravani25
6 Replies
2. Shell Programming and Scripting
I am able to execute awk command from shell prompt. but the same command is not getting executed when written and run in a bash script
the command from bash cmd prompt.
awk '/world/{for (i=2; i<NF; i++) printf $i " "; print $NF}1' myfile >tmp$$ ; mv tmp$$ myfile
file:
# hello world my... (4 Replies)
Discussion started by: ashima jain
4 Replies
3. UNIX for Dummies Questions & Answers
I have a unix command that prompts for 'y'. How do I run this from my shell script? (4 Replies)
Discussion started by: Sree10
4 Replies
4. Shell Programming and Scripting
Hi Guys..
Need your help to format the output of my shell script.
I am using spool command to take out put in csv file.
below is my code. (for example)
col USERNAME for a15
col EMAIL for a30
col FULL_NAME for a20
col LAST_LOGIN for a40
col DATE_CREATED for a40
SPOOL 120.csv... (3 Replies)
Discussion started by: Agupte
3 Replies
5. Shell Programming and Scripting
Can i do this
Say one command
sed 's/:*/ /g' $summf
is returning
C1234
C2345
C3434
some no of rows, now this ouput i have to insert it into a DB table
how do i do this?? (2 Replies)
Discussion started by: depakjan
2 Replies
6. Shell Programming and Scripting
Hi.
please help me to write the following query in a shell script.
the Query is :select no,salary from emp_info where name='$var_name'
the following is my code.
#! /bin/sh
var_name=$1
sqlplus -s user/pwd@DB << EOF
select no,salary from emp_info where name="'$var_name'";... (4 Replies)
Discussion started by: little_wonder
4 Replies
7. Programming
In a pro*C program, I use query follow:
INSERT INTO radacct_wk
SELECT (select psid from cscterminfo where cscterminfo.TELNO = username), nasipaddress, acctstarttime, acctstoptime,
acctsessiontime, acctinputoctets, acctoutputoctets, acctterminatecause, framedipaddress
FROM radacct@DBSV_B;... (7 Replies)
Discussion started by: quynhtrang
7 Replies
8. Shell Programming and Scripting
Hi,
I am working on a shell script that would verify if the mount command has executed or not. So , i have been doing this.
mount /dev/cdrom /mnt/cdrom
echo "$?"
if ; then
echo " Mount succesful"
else
echo " Mount unsuccessful"
fi (3 Replies)
Discussion started by: eamani_sun
3 Replies
9. Shell Programming and Scripting
i'm writing some simple scripts to help me learn perl.
why does the print command get called after the shell script is executed?
the purpose of the shell script is to simply echo to the screen "script run". which is does, but before the print command, you can clearly see the shell script is... (3 Replies)
Discussion started by: mjays
3 Replies
10. Shell Programming and Scripting
I have created abc.sh file which will set the environment variables (UNIX env variables as well as ORACLE required variables like ORACLE_SID,ORACLE_HOME etc) and then calls a function file which checks for starts some logs and then it will try to execute the .sql file. The .sh, function file are as... (1 Reply)
Discussion started by: sskc
1 Replies