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
Hi,
I have a shell script containing multiple PSQL queries for which I want the output to be redirected to a text file.
psql -U postgres -d database -o textfile.txt << EOF
Query1;
Query2;
Query ....;
EOF
When executing the script, queries outputs are directed to textfile.txt, however... (2 Replies)
Discussion started by: nms
2 Replies
3. UNIX for Beginners Questions & Answers
Hej guys,
I am trying to read a csv file line by line, save it's fields as variables per line so I can use them as parameters and execute stuff.
I am new to shell scripting and was just strictly following a tutorial. Somehow my version seems to ignore the loop. Any help?
TY! :)
#!/bin/bash... (12 Replies)
Discussion started by: Splinter479
12 Replies
4. UNIX for Dummies Questions & Answers
I have several problems with my problems: I hope you can help me.
1) the If else statement I am getting an error message. My syntax must be incorrect because the entire statement is throwing an error.
For example in filew.log if these items don't exist Memsize, SASFoundation and also if... (0 Replies)
Discussion started by: dellanicholson
0 Replies
5. Shell Programming and Scripting
I've got a file that looks like this (spaces before first entries intentional):
12345650-000005000GL140227 ANNUAL HELC FEE EN
22345650-000005000GL140227 ANNUAL HELC FEE EN
32345650-000005000GL140227 ANNUAL HELC FEE EN
I want to read through the file line by line,... (6 Replies)
Discussion started by: Scottie1954
6 Replies
6. Shell Programming and Scripting
Hi ,
I have a query like
select err_qty,drop_qty,unbld_qty,orig_qty from usage_data;
I need to store the values of these fetched fields in variables,
Need to edit them and update the new values into the table.
Can anyone please help me in writing this piece of code:( (1 Reply)
Discussion started by: Rajesh Putnala
1 Replies
7. Shell Programming and Scripting
Hi,
I have requirement to assign values to variables which are created dynamically.
Below is the code which i am using to achieve above requirement.
#!/bin/ksh
oIFS="$IFS"; IFS=','
STR_FAIL_PARENT_IF_FAILS="WF_F_P_IF_FAILS1,WF_F_P_IF_FAILS2,WF_F_P_IF_FAILS3"
set -A... (1 Reply)
Discussion started by: tmalik79
1 Replies
8. Shell Programming and Scripting
How can I read a string delimited on spaces and assign the fields to incremented variables.
For example:
Given $exts= txt dat mov
I want to read in $exts and have "txt" "dat" and "mov" assigned to incremented variables like $ext1, $ext2, etc. I would like to do this in a loop so that I can... (4 Replies)
Discussion started by: runit
4 Replies
9. Shell Programming and Scripting
Hi Everyone,
When i finish running
# echo `psql -t -U root databaseA -c "select a, b from book"`;
i get the output
107275 | 14 107301 | 2 107446 | 6 107820 | 77 107929 | 101
Would like to have the result like:
107275 | 14
107301 | 2
107446 | 6
107820 | 77
107929 | 101 (7 Replies)
Discussion started by: jimmy_y
7 Replies
10. 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