9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I'm a bit confused about the term ‘environment variables'.
Within your shell you can set two types of variables:
1. Shell variable - affecting functionality within your shell
2. User defined variable
When using the ‘export' command on a variable you make sure it's being inherited by new sub... (2 Replies)
Discussion started by: niels
2 Replies
2. UNIX for Advanced & Expert Users
Hi all,
I'm bit new to the advanced bash shell scripting.
When I'm looking at some of the existing code in my organization, got confused with a few variable definings.
For ex:
var1={1:-30}
var2="abc def ghi"
var3={xyz:-$var2}
In above, 1st and last lines are confusing me.... (4 Replies)
Discussion started by: raghu.iv85
4 Replies
3. Shell Programming and Scripting
Unix OS : Linux 2.6x
Shell type : Korn
I am stuck in weird problem .
In my shell script I am setting an environment variable using the following command :
EMP="KUMARJIT"; export EMP
In the following sections of the script , what I did is :
I created and initialized a new shell variable "type"... (5 Replies)
Discussion started by: kumarjt
5 Replies
4. Shell Programming and Scripting
HI
I have file A.txt
_1A
_2A
_3A
_4A
I want define all as different variable.
$1A=_1A
$2B=_2A
$3C=_3A
$4D=_4A
Now i can use any variable in my script. (3 Replies)
Discussion started by: pareshkp
3 Replies
5. Shell Programming and Scripting
Hi, Unix Gurus,
In our existing file, there is a script like
#!/bin/sh
step=${1:-0}
cur_step=10
if
...
My question is what's "${1:-0}" mean? I know it defines a variable but I don't know what's (1:-0) mean?
:wall:
Thanks in advance. (2 Replies)
Discussion started by: ken002
2 Replies
6. Shell Programming and Scripting
can anyone please help me with this:
i have written a shell script and a stored procedure which has one OUT parameter. now i want to use that out parameter as an input to the unix script but i am getting an error as variable not found. below are the unix scripts and stored procedure...
... (4 Replies)
Discussion started by: swap21783
4 Replies
7. Shell Programming and Scripting
i am using the below script and trying to move files in that directory in that pattern to archive. But it doesn;t seem to take the metacharacters. Please sugggest.
Code
Debug output: (1 Reply)
Discussion started by: dsravan
1 Replies
8. UNIX for Dummies Questions & Answers
I have a variable with a value of "05". When I add one to that variable, using the command: CURR_YY=`expr $CURR_YY + 1`, I get the value of "6", losing the leading zero (which is needed for passing to another script). How do I keep the leading zero?
Thank you! (10 Replies)
Discussion started by: cbarker
10 Replies
9. UNIX for Dummies Questions & Answers
I am using korn shell unix.
I have a script that I am working with to do a check for me using a text file.
#finds "Time" from the text file and cuts the second field from the #line
A= grep Time test.txt | cut -f2
# the "#Missing" is being pulled from the second field of the text... (1 Reply)
Discussion started by: cspcspcsp
1 Replies