10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have the following line in the script
but where I can check the value for this environement variable (2 Replies)
Discussion started by: stew
2. Shell Programming and Scripting
I have a variable name as below
Now i need to search for FCST in this variable and run a program
I am doing like this but it is failing
if ; then ****RUN PROGRAM**
Please use CODE tags when displaying sample input,... (3 Replies)
Discussion started by: Hypesslearner
3. UNIX for Advanced & Expert Users
I have a weird problem.
When i run the below code in SunOS and Linux i get different outputs
$ cat tst.ksh
echo "Abc" > $LOG_FILE
echo "Ret - $?"
Ret - 0
In GNU Linux (1 Reply)
Discussion started by: NickKnight
4. Shell Programming and Scripting
From a shell script, I'm trying to get the first two characters of an environment variable.
If I type at the command promot:
XX=`echo $MYVAR | cut -c1-2`
It works just fine
However, if I execute the exact same thing from a shell script, I get:
cut: you must specify a list of... (2 Replies)
Discussion started by: Boomn4x4
5. Shell Programming and Scripting
I need to cut the last seven characters of a variable length variable. The variable may be 7 characters or 70. I need to always be able to grab the last 7 characters. I looked at the cut command but it always seems to want to start at the beginning of a line, not the end and count backwards.
... (5 Replies)
Discussion started by: kblawson14
6. Shell Programming and Scripting
I have a variable var which contains "ABCDEFDH"
Now I have to remove the first 4 characters that is "ABCD"
so my variable should contain only "DEFH"
plzz tell me how to do that .
i am using bash shell (1 Reply)
Discussion started by: cynosure2009
7. Shell Programming and Scripting
How do I define a particular dir in front of PATH variable and then run some job and then at the end of job SET the PATH variable to original?
in a script, WILL something like this work:
RUN SOME JOBS .....
EXPORT... (2 Replies)
Discussion started by: Hangman2
8. UNIX for Dummies Questions & Answers
I need to get the specified word from the variable.can some one help me out in this ?
i need to get the value as :
So i need to ignore the last character and get the remaining values.
THANKS IN ADVANCE. (6 Replies)
Discussion started by: ithirak17
9. UNIX for Advanced & Expert Users
May be this is a very simple question...
$ readonly b
$ echo $b
-bash: b: readonly variable
$ unset b
-bash: unset: b: cannot unset: readonly variable
I m not able to change the readonly mode of variable b
Please help me out..
Nidhi (2 Replies)
Discussion started by: Nidhi2177
10. Shell Programming and Scripting
I have compilation directory structure the top level Makefile is the one that contains all the sub directories
I want to set in this Makefile env variable say : setenv OPTIMIZATION_LEVEL "1"
and when all the sub directories done compiling it will set this variable to different lavel... (0 Replies)
Discussion started by: umen