10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All, I am trying a script out that will startup on one of my servers. i wanted to check for RC 0 and if it didnt check out, exit.
Typo- This is BASH (Redhat)
This isnt working, and this is the best way to do error checking I feel. Heres my erorr
./start: line 25: syntax error near... (2 Replies)
Discussion started by: jeffs42885
2 Replies
2. Shell Programming and Scripting
cat test.sh
#!/bin/sh
expect <<- EOF
set timeout 5
spawn ssh -o StrictHostKeyChecking=no lyang0@128.224.178.245 -C mkdir -p /tmp
expect {
"Password:" {send "root\r"}
}
spawn scp -o StrictHostKeyChecking=no /tmp/1 lyang0@128.224.178.245:/tmp/
... (1 Reply)
Discussion started by: yanglei_fage
1 Replies
3. Shell Programming and Scripting
So I need to create an array that has " in the string of the text:
string = ( "value 1" "value2"
where the actual string is "value1" with the quotations included
would this work?
string = ( \"value1\" \"value\")
and if the strings contain spaces as well:
string = ("\"this... (4 Replies)
Discussion started by: os2mac
4 Replies
4. Shell Programming and Scripting
Hello all,
after spending hours of searching the web I decided to create an account here. This is my first post and I hope one of the experts can help.
I need to resolve a grep / sed / xargs / awk problem.
My input file is just like this:
----------------------------------... (6 Replies)
Discussion started by: bash4ever
6 Replies
5. Shell Programming and Scripting
i have something like this...
echo "teCertificateId" | awk -F'Id' '{ print $1 }' | awk -F'te' '{ print $2 }'
Certifica
the awk should remove 'te' only if it is present at the start of the string.. anywhere else it should ignore it.
expected output is
Certificate (7 Replies)
Discussion started by: vivek d r
7 Replies
6. Shell Programming and Scripting
Hello!
I have one strange question - let's say I have a long, multiple-line string displayed on the terminal using echo, and I would like to make a carriage return to the beginning of this string, no to the beginning of the last line - is something like that possible? I would like to be able to... (1 Reply)
Discussion started by: xqwzts
1 Replies
7. Shell Programming and Scripting
My input strings look something like this:
/dev/vs/dsk/group/vol
I want to print just "group" out of the line... which is always found between the 4th and 5th "/" in the string.
I figure I have to use awk, sed, or some combination to do this, but I've searched the forums and can't find... (2 Replies)
Discussion started by: ltricarico
2 Replies
8. Shell Programming and Scripting
function blah {
return "string"
}
it keeps saying string: not found
How can i do this guys? Because I'm trying to do something like this
function print_daemon_options {
echo "Start Daemons - Please enter one or a combination of the following:"
if isDatasubEnabled &&... (11 Replies)
Discussion started by: pyscho
11 Replies
9. Shell Programming and Scripting
Hi,
I'm porting an install script from AIX to Red Hat (2.6.18-164.el5 #1 SMP)
I have this script working in both AIX and HP-UX.
The script is a wrapper for a Micro Focus Server Express install program. It responds to the install program questions with a here-now list. Responses includes... (14 Replies)
Discussion started by: duker61
14 Replies
10. Shell Programming and Scripting
While I am by habit comfortable with bash as a shell, from time to time, I find tiny reasons to believe it's a little dense. One of the things that proves it is: to date, I have not been able to get it to identify what WM it's running inside of or alongside of in an X11 kind of environment... (1 Reply)
Discussion started by: SilversleevesX
1 Replies