10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
greetings,
i have a variable $input that i want to use to set $output. $input is /dir/filename.mph and $input is passed to my script that i manipulate it as follows:
input=`basename $input`i want the $output to be filename_solved.mph, basically stuffing "_solved" in the filename. here's how i... (2 Replies)
Discussion started by: crimso
2 Replies
2. Shell Programming and Scripting
hi,
i'm not a root user and i want to know which user and in which file is loaded a variable seen in the "env" display ?
I will use this variable but i want to be sure that it will be a permanent variable !
i don't see it in my files (.profile , kshrc...) and neither in /etc/profile.
... (3 Replies)
Discussion started by: Nicol
3 Replies
3. 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
4. UNIX for Dummies Questions & Answers
Hi All
I've very nearly finished this script I'm working on but have hit another idiots problem, after googling I can't see a solution for this one.
I have a while count loop that checks checks two consecutive values then increments the count by two.
What the script has to do is then check... (5 Replies)
Discussion started by: Bashingaway
5 Replies
5. Shell Programming and Scripting
Okay, probably an easy solution, but I've given up. I want to set a variable with a variable and print it in PHP. I just can't get the syntax right. As an example:
$place = "T";
$norm_t = array("4","7");
I want to use this in a for-loop. How do I echo the first number of the norm_t... (4 Replies)
Discussion started by: wxornot
4 Replies
6. Shell Programming and Scripting
Dear All,
Can anyone advise why this script isn't run as expected?
===========================
status=0
cat /etc/passwd |
while read line; do
status=1
done
echo $status
===========================
it always return 0 , but not 1. why?
anything wrong?
Thanks. (1 Reply)
Discussion started by: tiger2000
1 Replies
7. Shell Programming and Scripting
In ksh I thought a global variable was any variable in a script or function that did not have the typeset command. I have a global in my calling script which I increment in a function, but the value does not change in the calling script. Here is the code:
function f_open_log
{
typeset -r... (5 Replies)
Discussion started by: robotball
5 Replies
8. Shell Programming and Scripting
okay, this shouldn't be difficult but I can't figure it out. How can I set a variable with another variable. I have the following:
foreach pe ($dir $sp)
set tpe = `echo $pe | grep M`
if ($tpe == M) then
set ${$pe} = M <--- This doesn't work
else
endif
end
In this case what... (2 Replies)
Discussion started by: wxornot
2 Replies
9. Linux
Hi,
I am quite new to Linux. And I have doubt how to set new environment variable with value to a C executable.
Let say I have a environment variable $Hack ;
I would like to load a value for this variable; so that when the C executable is executed, the $Hack would set the variable value.
... (4 Replies)
Discussion started by: ahjiefreak
4 Replies
10. UNIX for Dummies Questions & Answers
I'm having an issue when I export within my program. I'm getting the variable name, not the variable value. I have a configuration file (config.txt) that has the values of the variables set as so:
set -a
export ARCHIVEPOSourceDir="/interfaces/po/log /interfaces/po/data"
export... (2 Replies)
Discussion started by: ParNone
2 Replies