10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
Need help, using awk command to insert statement
awk -v q="'" '{ print "db2 connect to repolab > /dev/null; " "\n" "db2 -x \" select name from IBMPDQ.PROFILE where managed_database = " q $1"_"$3"__0" q "\"" } ' profile.txt | sh - | awk -v i="'" ' { print "db2 connect to repolab >... (1 Reply)
Discussion started by: Mathew_paul
1 Replies
2. UNIX for Beginners Questions & Answers
Hi Gurus... good day;
currently I trying to run the df -g command with awk to get to convert in SQL statement, but I have some errors;
df -g | awk '{print "This is the FileSystem: " $NF, " This is LV: "$1, "This is SIZE: "$2, "This is FREE: " $3, "This is the USED% "$4}'
This on AIX... (3 Replies)
Discussion started by: wcastibl
3 Replies
3. Shell Programming and Scripting
Hi folks,
I have a scenario to convert the update statements into insert statements using shell script (awk, sed...) or in database using regex.
I have a bunch of update statements with all columns in a file which I need to convert into insert statements.
UPDATE TABLE_A SET COL1=1 WHERE... (0 Replies)
Discussion started by: dev123
0 Replies
4. Shell Programming and Scripting
Hi Friends,
Below is my input file with "|" (pipe) as filed delimiter:
My Input File:
HDR|F1|F2||||F6|F7
I want to inser values in the record for field 4 and field 5.
Expected output
HDR|F1|F2||F4|F5|F6|F7
I am able to append the string to the end of the record, but not in between the... (3 Replies)
Discussion started by: Ajay Venkatesan
3 Replies
5. Shell Programming and Scripting
hi all i need to add the prinf statement in awk command for the converted comma separated output....
below is my code :
Code Credits :RudiC
awk -F, 'NF==2 {next}
{ITM=$1
AMT=$2+0
CNT=$3+0
TOTA+=$2
... (4 Replies)
Discussion started by: hemanthsaikumar
4 Replies
6. Shell Programming and Scripting
Hello
can you please help me with below script which is meant to delete clients from multiple netbackup policies
I want to run a command insdie awk statement
apparelnlty this script is not working for me
for i in $( cat clients_list)
do
bppllist -byclient $i | awk... (6 Replies)
Discussion started by: Sara_84
6 Replies
7. Shell Programming and Scripting
Hi All,
I need a help on inserting a XML tag.
Actual input
<var>
<nam>abcd</nam>
<a1>.</a1>
</var>
if tag <a1>.</a1> is getting missed in XML like below
<var>
<nam>abcd</nam>
</var>
i need to insert wherever it is missed after <nam> tag and before </var> tag.
Could anyone... (3 Replies)
Discussion started by: mohanalakshmi
3 Replies
8. Shell Programming and Scripting
Hi Guys,
I want to create a shell script that will give me the output below. I want to insert the numbers from the input file to my url addresses below. And from the numbers below, I want to separate the last digit with a period (i.e. from 222222222222 to 22222222222.2). Appreciate any help.... (14 Replies)
Discussion started by: pinpe
14 Replies
9. Shell Programming and Scripting
Hi All,
I am using Unix ksh script.
I need to insert values to a table using the o/p from a slelect statement.
Can anybody Help!
My script looks like tihs.
---`sqlplus -s username/password@SID << EOF
set heading off
set feedback off
set pages 0
insert into ${TB_NAME}_D... (2 Replies)
Discussion started by: nkosaraju
2 Replies
10. Shell Programming and Scripting
Hi all,
How can i use the below unix command in AWK . Can any one please suggest me how i can use.
sed -e "s/which first.sh/which \$0/g" $shell > $shell.sal
where $0=current program name(say current.sh)
$shell=second.sh (1 Reply)
Discussion started by: krishna_gnv
1 Replies