10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have the variable defined in .bashrc
BIN_DIR="/usr/local/dw"
and in my shell script i am using below.
#!/bin/bash
echo "Bin Dir: ${BIN_DIR}"
. "${BIN_DIR}"/dwh_Loadfuncs.sh
Output:
Bin Dir:
/usr/local/dw/dwh_LoadXMLFileIntoStage.sh: line 7: /dwh_Loadfuncs.sh: No such file or... (3 Replies)
Discussion started by: Ariean
3 Replies
2. Shell Programming and Scripting
I have a simple script that sets a value and reads the value in csh:
set -x
set a = 10
echo $a
The output of the script does not show the value of a
+ set a = 10
+ echo
any help would be great. (4 Replies)
Discussion started by: pt14
4 Replies
3. Shell Programming and Scripting
Hello,
I need to read a variable value from script.
Below is the scenario
I am reading a value from an external file say a.txt
a.txt:
Jan
Feb
Mar
I need the corresponding value of the months in in numerics such as Jan -->1,
Feb-->2 etc.
I have this mapping in another file... (1 Reply)
Discussion started by: aixjadoo
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a situation where I need to read a variable from another file. But the problem is that the variable in the other file is starting with $.
E.g.
file1:
$var1=out
temp_ss.sh:
. file1
echo "Print : $var1"
It works fine if the file1 is having var1=out (note that it is... (6 Replies)
Discussion started by: shash
6 Replies
5. Shell Programming and Scripting
Hi,
Here is the output of lpstat. I would like to read value of Queue which is(abxxxxb1)and status that is DOWN in first line. i dont care what is in second line. any one can help me.thanks
Queue Dev Status Job Files User PP % Blks Cp Rnk
------- ----- ---------... (5 Replies)
Discussion started by: sagii
5 Replies
6. Shell Programming and Scripting
Is there a command for finding all files on the system named ".bashrc" that modify the PS1 variable? I'd like to list the full file name(s) and the protection (including the full path). (5 Replies)
Discussion started by: raidkridley
5 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I have a file (details.txt) with 3 rows of variables ie...
name postcode age
john D fr25dd 25
mark W ab122aa 22
phil C cd343bb 33
What I want to do is read down the list with a loop and add each field into a one line piece of text...
So I have a file (test1) which reads;... (3 Replies)
Discussion started by: starsky
3 Replies
8. UNIX for Advanced & Expert Users
Hi,
I have a text file in which , I have contents like
t1=abc
t2=xyz
t3=awe
......
I am able to read contents of these variables in a script by
. /temp.txt
echo $t1
Now, what my requirement is something like this
a="t"
i=1
echo $a$i --->this is displaying t1 (3 Replies)
Discussion started by: kaaakrishna
3 Replies
9. Shell Programming and Scripting
I'm trying to make changes in a file using the following bash script:
#!/bin/bash
MYHOME=`echo $HOME`
README=$MYHOME"/environment"
IAM=`whoami`
CHANGEPATHLIST="TALOG TACONFIG TAINFO TAWORK TMPSPACE"
for var in $CHANGEPATHLIST
do
perl -pi -e 's/sacuser1/$IAM/ if m/$var/' $README... (3 Replies)
Discussion started by: yoonixq4u
3 Replies
10. Shell Programming and Scripting
hi all
i have joined new to the group.
i have set an variable in my bashrc file.
.bashrc
PROGHOME=/home/braf/braf/prog
export PROGHOME
but while using it in my shell script its path is not taken and i had to explicitly give the export command to set the path.
in my script... (8 Replies)
Discussion started by: krithika
8 Replies