10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello.
I would like to make this bash command working.
In the following code, the bash variable 'ZYPPER_LOCAL_REP' contain a full pathname like '/path/to/path/somewhere'
The command list all available repositories,
search for the string 'zipper_local'
then on the same line search for... (4 Replies)
Discussion started by: jcdole
4 Replies
2. Shell Programming and Scripting
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies
3. UNIX for Dummies Questions & Answers
Dear Unix gurus,
We have a config shell script file which has 30 variables which needs to be passed to master unix shell script that invokes oracle database sessions. So those 30 variables need to go through the database sessions (They are inputs) via a shell script. one of the variable name... (1 Reply)
Discussion started by: dba1981
1 Replies
4. 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
5. UNIX for Advanced & Expert Users
Hi,
I need to extract all the content between two strings stored in two variables "startstring" and "endstring"
startstring=hello
enstring=world
#notworking
awk '/$startstring/, $NF ~ /$endstring/ ' file > file2
The above code is not working with variables. It works when actual string... (2 Replies)
Discussion started by: jeanjkj
2 Replies
6. Shell Programming and Scripting
I am trying to print text between two variables in a file
I have tried the following things but none seem to work:
awk ' /'$a'/ {flag=1;next} /'$b'/{flag=0} flag { print }' file
and also
sed "/$a/,/$b/p" file
But none seem to work
Any Ideas?
Thanks in Advance (5 Replies)
Discussion started by: forumbaba
5 Replies
7. Shell Programming and Scripting
How to to pass variable to the below awk command
I would like to pass variables to the awk command instead of the constants "a/cc" but I don't know exactly the correct syntax
awk '/a/,/cc/' temp1.out
file.txt
a
b
s
cc
g
d
output
a
b
s (8 Replies)
Discussion started by: ahmedamro
8 Replies
8. Shell Programming and Scripting
I have a perl script that opens a text file containing numbers on each line:
for example:
755993
755994
755995
755996
755997
755998
The perl script takes these numbers and store them as an array @raw_data, where I can access individual numbers by using $raw_data for the value 755993.... (2 Replies)
Discussion started by: xchen89x
2 Replies
9. AIX
Hi,
I'm making progress on this but hung up on one last detail. I'd like to use AWK to pass the system date and time(among other things) to the first line of a file.
Here's what I have:
BEGIN {TOTALPP = 0;FREEPP=0;USEDPP=0;print "LPAR NAME:",lpar,"DATE:",tdate }
I call AWK with the... (4 Replies)
Discussion started by: cruiser
4 Replies
10. Shell Programming and Scripting
Hi,
I am trying to pass some of the variables in my shell scripts to the sqlplus call and use them as parameters.
For example, I would like to replace the 'SAS', and '20050612' with $var1 and $var2, respectively, how can I do that?
--------------------------------------------------------... (1 Reply)
Discussion started by: Jtrinh
1 Replies