10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am trying to echo a variable exactly to a script-
echo "${var1} ${var2} >> output.output
Gives me a blank file.
I would like output.output to basically say:
${var1} ${var2}
I think I need to use a special escape character for variables. Am I right in assuming that, and is it the... (8 Replies)
Discussion started by: jeffs42885
8 Replies
2. Shell Programming and Scripting
These seems ridiculously simple but I can't get it to work. Using korn shell and I want to pass in a flag to tell my echo statements to either write to the screen for debugging or a file if not. So I have something like:
if ; then
logout=&1
else
logout='logfile.out'
fi
Then... (2 Replies)
Discussion started by: DJR
2 Replies
3. Shell Programming and Scripting
Hello,
First post for Newbie as I am stumped. I need to get certain elements for a specific PID from the ps command. I am attempting to pass the value for the PID I want to retrieve the information for as a variable. When the following is run without using a variable, setting a specific PID,... (3 Replies)
Discussion started by: Coyote270WSM
3 Replies
4. Shell Programming and Scripting
Hi everybody,
I am trying to do the thing you see in the title, and I can't simply do
a=$(svn up)
echo $a
because the program (svn) gives output on lots of lines and in the variable the output is stored on only one line (resulting in a horribly formatted text). Any tips?
Thanks,... (2 Replies)
Discussion started by: ocirne94
2 Replies
5. UNIX for Dummies Questions & Answers
Hi all,
The below command tries to copy ".tgz" instead of "hello_test.tgz" -- It seems as if the underscore gets in the way. I tried with different ways of using quotes, with no luck, unfortunately...it's probably very simple, but may I ask how this would be done:
How would the below be... (3 Replies)
Discussion started by: chatguy
3 Replies
6. Shell Programming and Scripting
Hi
I have a variable BIT1 which holds some value. Is there a way to retrieve the value of this variable indirectly via another variable, lets say SUBSET_BIT_NUM=1, so the call will look something like this:
sundev1 $ echo ${BIT${SUBSET_BIT_NUM}}
ksh: ${BIT${SUBSET_BIT_NUM}}: bad substitution
... (3 Replies)
Discussion started by: aoussenko
3 Replies
7. Shell Programming and Scripting
Using Cygwin PDksh - But also have tested it on Linux with same results
----
I have a script that invokes a program/script and returns a string of data (1234 "12 34 56" 6789) and using "set -A" inserting it into an array.
script code snipit >>
get_array=$(php... (2 Replies)
Discussion started by: carlos25
2 Replies
8. Programming
Hi, I need to set stdout to go to a String variable, has anyone got any ideas? (6 Replies)
Discussion started by: cb.mark
6 Replies
9. Shell Programming and Scripting
This is what I tried:
vara=${varb}_count
(( vara += 1 ))
Thanks for help (4 Replies)
Discussion started by: pa3be
4 Replies
10. Shell Programming and Scripting
Hey all, been so long since I've done any KSH scriptting, I've forgotten exact sytax. 2 things,
1) I need to dot in an environment file that is a list of server names
2) I need to loop through though server names in a while loop, or until loop.
Here's roughly what I have and trying to hammer out... (2 Replies)
Discussion started by: jpeery
2 Replies