10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Trying to use awk to format the input based on the filed count being 5. Most lines are fine using the awk below, except the first two lines. I know the reason is the -1 in green and -2 in blue. But can not figure out how to not split on the - if it is followed by a digit then letter. Thank you :).... (1 Reply)
Discussion started by: cmccabe
1 Replies
2. Shell Programming and Scripting
Hi All,
we have a requirement to split a content in a text file every 5 rows and write in a new file .
conditions:
if 5th line falls between center of the statement . it should look upto after ";"
files are below format:
1 UPDATE TABLE TEST1 SET VALUE ='AFDASDFAS'
2 WHERE... (3 Replies)
Discussion started by: KK230689
3 Replies
3. UNIX for Advanced & Expert Users
I have a huge file with the following input:
Case1 Specific_Info Specific_Info
Case1 Specific_Info Specific_Info
Case3 Specific_Info Specific_Info
Case4 Specific_Info Specific_Info
Case1 Specific_Info Specific_Info
Case2 Specific_Info Specific_Info
Case2 Specific_Info Specific_Info... (2 Replies)
Discussion started by: laurigo
2 Replies
4. Shell Programming and Scripting
Hi ,
cat myfile.txt
! 3100.2.0.5 ! 3100.2.22.4 ! 3100.2.30.33 ! 3100.2.4.1 !
! 3100.2.0.5 ! 3100.2.22.4 ! 3100.2.22.11 ! 3100.2.4.1 !
! 3100.2.0.5 ! 3100.2.2.50 ! 3100.2.22.11 ! 3100.2.4.1 !
! 3100.2.0.5 ! 3100.2.22.4 ! 3100.2.30.33 ! 3100.2.4.1 !
! 3100.2.0.5 ! 3100.2.22.4 !... (6 Replies)
Discussion started by: OTNA
6 Replies
5. Shell Programming and Scripting
Hi ,
Please excuse me for opening a new thread i am unable to find out the syntax error
in my if else condition inside for loop in awk command ,
my actual aim is to print formatted html td tag when if condition (True) having string as "failed",
could anyone please advise what is the right... (2 Replies)
Discussion started by: karthikram
2 Replies
6. Shell Programming and Scripting
hi,
I have some problems in my simple script about the redirect echo stdout command inside a condition. Why is the echo command inside the elif still execute in the else command
Here are my simple script
After check on the two diff output the echo stdout redirect is present in two diff... (3 Replies)
Discussion started by: jao_madn
3 Replies
7. Shell Programming and Scripting
Hi all,
I am using the below given sqlplus command in my unix script to invoke a stored procedure which returns a value .It works fine.
RET_CODE=$(/opt/oracle/product/10.2.0.4.CL/bin/sqlplus -S $USER/$PASSWD@$DB_NAME <<EOF
EXEC MY_PKG.MY_SP (:COUNT);
PRINT COUNT;
commit;
... (6 Replies)
Discussion started by: Shri123
6 Replies
8. Shell Programming and Scripting
$ cat file
H1:12:90
k:12:b
n:22:i
k:54:b
k:42:b
s:48:s
a:41:b
t:18:n
c:77:a
I am trying to split above file based on $2 such that if $2 is rounded to nearest 10's multiple (e.g. 10,20,30 etc), each sub file should contain 3 multiples and so on (also I want to keep header i.e. NR==1, in... (6 Replies)
Discussion started by: uwork72
6 Replies
9. Shell Programming and Scripting
hi ,
I have a String str="/opt/ibm/lotus/ibw/latest" or ="/opt/lotus/ibw/latest" this value is dynamic..I want to split this string into 2 strings
1. /opt/ibm/lotus(/opt/lotus) this string must ends with "lotus"
2./ibw/latest
can any body help me on this?
Regards,
sankar (2 Replies)
Discussion started by: sankar reddy
2 Replies
10. Shell Programming and Scripting
I have the file with the records like
4234234 US phone
3244234 US cup
2342342 CA phone
8947234 US phone
2389472 CA cup
2348972 US maps
3894234 CA phone
I want the records with (US,phone) as record to be in one file, (Us, cup) in another file and (CA,cup) to be in another
I mean all... (12 Replies)
Discussion started by: superprogrammer
12 Replies