10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
I have written a command n shell script :
srvctl relocate service -d t1 -s s1 -i i1 -t t1 -f
If the above command executes successfully without error I need to echo
"Service relocated successfully
and If it errors out I need to trap the errors in a file and also need to make... (1 Reply)
Discussion started by: Vishal_dba
1 Replies
2. Shell Programming and Scripting
Hi,
I have below shell script..
$ cat /tmp/1.txt
NAME-HOST-APPLIED TIME-DATE
$ cat /tmp/1.sh
#!/bin/ksh
echo "<html><table border size=1>" > /tmp/mail.html
for i in `cat /tmp/1.txt`
do
a1=`echo $i |cut -d "-" -f1`
a2=`echo $i |cut -d "-" -f2`
a3=`echo $i |cut -d "-" -f3`
a4=`echo $i... (4 Replies)
Discussion started by: thomasraj87
4 Replies
3. UNIX for Dummies Questions & Answers
Hi
I have written a bash script to capture the output of jmap.
The command i execute is jmap -heap <pid>
This gives details of memory usage of the process with <pid>.
Now jmap not only gives this info but also prints couple more lines, which i am not interested in. Here are the lines that I... (3 Replies)
Discussion started by: avinthm
3 Replies
4. Shell Programming and Scripting
Hi Friends,
I am trying a very simple thing to print through bash shell scripting using echo but failing. My script is-
A=Abha
B=Biha
C=2011
D=5
echo " The name is $A_$B$C0$D"
It should print-
"The name is Abha_Biha201105"
but it's printing something else. Is my script wrong?... (2 Replies)
Discussion started by: NARESH1302
2 Replies
5. HP-UX
Hi,
I am using hp unix
i want to know the use of the following commands
set --
set - variable
thanks (4 Replies)
Discussion started by: gomathi
4 Replies
6. Shell Programming and Scripting
I am new to the c shell script, can you let me know why the set rr= is not working.
C shell script
#! /bin/csh
Set tt= 12345_UMR_BH452_3_2.txt
set rr='echo $tt | cut –d”_” -f1'
syntax error (4 Replies)
Discussion started by: jdsignature88
4 Replies
7. Shell Programming and Scripting
Hi All,
I am pasting my code below
if # e means file exists
then
echo OFR_Configlist exists >> OFR_Backup_Configfiles.log
else
echo OFR_Configlist Not exists >> OFR_Backup_Configfiles.log
exit
fi
How can i show the echo message in console also at the same time?
I dont want to write... (3 Replies)
Discussion started by: subin_bala
3 Replies
8. Shell Programming and Scripting
Suppose that you want to mostly not echo commands inside your script during execution (e.g. to not bog the user down with details that they do not care about) but that there is the occaisional script line that you would like to echo before you execute it.
Is there an elegant way to achieve this?... (3 Replies)
Discussion started by: fabulous2
3 Replies
9. UNIX for Dummies Questions & Answers
Major Newbie here folks. I'm trying to set a variable to my Home directory and then echo it to the screen.
Any and all help is greatly appreciated.
Thanks
Anna (3 Replies)
Discussion started by: amidget
3 Replies
10. Shell Programming and Scripting
I'm looking at my bash man page and I'm expecting to find some option that I can use to make it echo every command that it executes. The description of --verbose was pretty terse!
Is --verbose supposed to make it echo every command it executes?
My bash script script (named ws2) contains a... (1 Reply)
Discussion started by: siegfried
1 Replies