10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a input file like this.
Sample.txt
30 | TXDatacenter | TXBackupDC
10 | UKDatacenter | UKBackupDC
0 | NLDatacenter | NLBackupDC
......
......
......
I need to get these values in different variables like this.
Load1=30
PriCenter1=TXDatacenter... (5 Replies)
Discussion started by: Visha
5 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have a text file as follows:
a.txt
------
STEPS=3
STEP_DURATION=100
INTERVAL=60
I want to use these values in a shell script.
How to go about this? (3 Replies)
Discussion started by: akarnya
3 Replies
3. Shell Programming and Scripting
To all geeks,
What I want to achieve:
1. Accept two filenames from user and store the filenames in two variables (FILE1 and FILE2)
2. Check if files exisits. If doesn't, then exit
3. If files exist, look for a particular string in both files
4. If the string exists, then change the... (8 Replies)
Discussion started by: Deepak Tulsani
8 Replies
4. UNIX for Dummies Questions & Answers
Hello!!
Am trying to substitute the value of a shell variable with the value of another shell variable. The values are obtained into the shell variables through some other processing.
for ex.
i've used the follow sed command..
sed "s/$var1/$var2/g"
i've also tried the other... (5 Replies)
Discussion started by: a_ba
5 Replies
5. UNIX for Dummies Questions & Answers
hello!
I am trying to use sed to copy specific set of lines from a file for which the starting and ending line numbers of the lines to be copied are stored in shell variables. How can i copy those lines?
if the input_file is something like this
and if the following is the script
a=2
b=4... (4 Replies)
Discussion started by: a_ba
4 Replies
6. Solaris
Hi guys. Good day, morning, afternoon or night, depending on where you live.
I have a script shell in which I am looping on files (absolute path) see code section above.
I always have an error: bad substitution.
:wall:
Is it because my variable file is the index of the loop and not a normal... (4 Replies)
Discussion started by: soueric
4 Replies
7. Shell Programming and Scripting
Hi,
I'm using an array that contains compiler FLAGS
that need to be executed either before ./configure
or after the main 'make' command.
example of array containing compiler flags.
-------------------------------------------------
FLAGS="CFLAGS=\"-arch x86_64 -g -Os -pipe... (7 Replies)
Discussion started by: ASGR
7 Replies
8. UNIX for Advanced & Expert Users
My specific goal: automatically edit a Makefile variable's (EXTRAVERSION)
value in a kernel Makefile.
So, I have a shell script that takes one parameter, a version string:
buildkernel.sh 2.6.18.21.7-custom
In the script, I assign the parameter to K_VER:
K_VER="2.6.18.21.7-custom"... (2 Replies)
Discussion started by: duderonomy
2 Replies
9. Shell Programming and Scripting
How do i use a config.txt to recursively pass a set of variables to a shell script
eg my config.txt looks like this :
path=c://dataset/set1
v1= a.bin
v2= b.bin
path=c://dataset/set2
v1= xy.bin
v2= abc.bin
..................
and so on .
and my testscript : (2 Replies)
Discussion started by: pradsh
2 Replies
10. Shell Programming and Scripting
Hi
I have a variable whose value is like this
i=/test/test1/test2/myfile.cd.070505123457
i would like to have the value of myfile.cd stored into another variable
my attempt is
test=${i##*/} ;echo $test ##and i get
myfile.cd.070505123457
since what i wnat is myfile.cd i try this... (19 Replies)
Discussion started by: xiamin
19 Replies