HI group,
im trying to do the following:
print a statement "im learning unix"
append the contents of a file
print another line at the end.
---all into one single file.
expected output:
im learing unix
--- contents from a file--------
1
2
3
4
------conetnts from the line ends--
lastline " >...
Hi chacalinc,
The awk concatenates all the lines and doesnt restore the spaces between.
say Select actb_cd pair() ,
actv_df_pair ,
is converted to Selectactb_cd pair(),actv_df_pair,
Thanks
roe
your are right, after vi :set list i see the control characters as || 'ú' ||$. Please let me know how to delet this??
Thank you all for your time and help!!
roe
i rechecked the sed that i executed : its "ditto" as the one you sent. but still the same output as before. Im on HP-UX.
Appreciate your time and help!
Thanks
roe
I have the following numerous line in input file:
nvl(MP_MID_INIT_TXT, ' ') || 'M-G' ||
lpad(nvl(MP_SEQ_IMS_ID, 0), 3, 0) ||
lpad(nvl(MP_IMS_ID, 0), 7, 0) || 'M-G' ||
from which i need to delete the || 'M-G' || and ||...
i have the sed statement to change
to_char(BASE_DT, 'YYDDD')to to_char(CYC_DT, 'YYDDD')BASE_DT.
The sed that i have is :
sed 's/to_char\(BASE_DT, \'YYDDD\'\)/to_char\(CYC_DT, \'YYDDD\'\) BASE_DT/g' outdat.sql > osql.sql
However this gives an error. Please advice on the right syntax.
Thanks a...
futurlet,
The modified awk worked fine for the sub( /B\./, "" ),
but the
sub( /\(B\.In_DT,'YYDD'\)/, "(OT_DT,'YYDDD')In_DT" )
doesnt still substitute for the desired one.
I have oin the first line :
select to_char(A.BASE_DT, 'YYDDD') || 'M-G' || which needs to be changed to...
Futurlet,
Thanks alot for the superb script. Though the above awk does most of the tasks required, it however doesnt change the occurance of B. to " " as required. Also i need to
replace the occurance of
'(B.In_DT,'YYDD')' to '(OT_DT,'YYDDD')In_DT'.
Please advice on modifying the awk for the...
Futurlet,
Thanks alot for the superb script. Though the above awk does most of the tasks required, it however doesnt change the occurance of B. to " " as required. Also i need to
replace the occurance of
'(B.In_DT,'YYDD')' to '(OT_DT,'YYDDD')In_DT'.
Please advice on modifying the awk for the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.