10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Folks,
I'm currently trying to read several values into different variables.
Actually, what I'm doing works, but I get an error message.
My attempts are:
read strCPROC strIPROC strAPROC <<<$(ssh -n -T hscroot@$HMC "lshwres -r proc -m $strIDENT --level sys -F \"configurable_sys_proc_units... (11 Replies)
Discussion started by: NKaede
11 Replies
2. Shell Programming and Scripting
I am trying to keep variables in a file.
if I have all variables at the same time, I can write them all like below.
echo $var1","$var2","$var3
But, these variables are being calculated at different times then they are lost
so I want to keep them in a file seperated by "," .
echo... (5 Replies)
Discussion started by: snr_silencer
5 Replies
3. Shell Programming and Scripting
I have the following:
#! /bin/bash
foo="bar"
this="that"
vars="foovar=$foo\n\
thisvar=$this\n"
I want to write the following to a file:
foovar="bar"
thisvar="that"
Then in another script, I pull this file, and loop through it:
while read line; do
eval $line
done <... (3 Replies)
Discussion started by: Validatorian
3 Replies
4. Shell Programming and Scripting
Hello Team,
I have the following line in a .sh file .That means if we add my file.sh file to crontab .The crontab will read the first line where the db2 profile is installed.Can some body help me how to recode this using a variable ?
That means the below path is static to a perticular... (3 Replies)
Discussion started by: rocking77
3 Replies
5. Shell Programming and Scripting
I cannot get the following substitution ($ORACLE_SID) to work:
The variable ORACLE_SID is set to wardin my environment. It has been exported.
I have a text file called test.dat:
/u07/oradata/${ORACLE_SID}/extab/finmart/summit/ps_voucher_line_crnt_ex.dbf... (2 Replies)
Discussion started by: bradyd
2 Replies
6. IP Networking
Hi,
We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies
7. Shell Programming and Scripting
Hi All
I have something that from the outset seems really trivial but in practice is not quite working.
I have the following code sample in my shell script which illustrates the problem
echo "enter home directory"
read home
mkdir $home/newdir
The user then enters a logical $HOME... (3 Replies)
Discussion started by: kingpin2502
3 Replies
8. Shell Programming and Scripting
I need to find all the files that have group Read or Write permission or files that have user write permission.
This is what I have so far:
find . -exec ls -l {} \; | awk '/-...rw..w./ {print $1 " " $3 " " $4 " " $9}'
It shows me all files where group read = true, group write = true... (5 Replies)
Discussion started by: shunter63
5 Replies
9. UNIX for Dummies Questions & Answers
I know there are caveats about using read in pipelines because read is treated by a subshell. I know this but I can't think of any way to accomplish this regardless, I'm still a rookie.
I hope somebody will be able to interpret what it is that I'm trying to accomplish and correct me.
... (2 Replies)
Discussion started by: ProGrammar
2 Replies
10. Shell Programming and Scripting
Hi
I need some help on SED command
I am writing a shell script which does the following:
1. Read one line at a time from a file abc.txt which has millions of lines
2. Prefix each line read with some text "
3. Post fix each line read with a quote "
4. Write the new modified... (11 Replies)
Discussion started by: gaurav_1711
11 Replies