10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have the following line in the script
unset _SET_ENV_AA
unset _SETENV
but where I can check the value for this environement variable (2 Replies)
Discussion started by: stew
2 Replies
2. Shell Programming and Scripting
Hi all
I have a variable name as below
runbatch=FCSTworLOADfx_CYR
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 help
DJ
Please use CODE tags when displaying sample input,... (3 Replies)
Discussion started by: Hypesslearner
3 Replies
3. UNIX for Advanced & Expert Users
Hi all,
I have a weird problem.
When i run the below code in SunOS and Linux i get different outputs
====
$ cat tst.ksh
#!/bin/ksh
echo "Abc" > $LOG_FILE
echo "Ret - $?"
=====
In Solaris
$ ./tst.ksh
Abc
Ret - 0
In GNU Linux (1 Reply)
Discussion started by: NickKnight
1 Replies
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`
echo $XX
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
2 Replies
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
5 Replies
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
1 Replies
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:
ORIG_PATH=$PATH
export PATH=/dir1/dir2:$PATH
RUN SOME JOBS .....
unset PATH
EXPORT... (2 Replies)
Discussion started by: Hangman2
2 Replies
8. UNIX for Dummies Questions & Answers
Hi ,
I need to get the specified word from the variable.can some one help me out in this ?
input=ASD34567P
i need to get the value as :
output1=34567
So i need to ignore the last character and get the remaining values.
THANKS IN ADVANCE. (6 Replies)
Discussion started by: ithirak17
6 Replies
9. UNIX for Advanced & Expert Users
Hi All,
May be this is a very simple question...
$ b=8
$ readonly b
$ echo $b
8
$ b=90
-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..
Thanks
Nidhi (2 Replies)
Discussion started by: Nidhi2177
2 Replies
10. Shell Programming and Scripting
Hello
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
0 Replies