|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
Hey,
I have a SQL statement as follows : select tab1.col1, tab2,col2,tab3.col3 from scott.emp where tab1.col1 = tab2.col2 and tab2.col2 = tab3.col3 I need this statement to be formatted as follows : select tab1.col1, tab2,col2, tab3.col3 from scott.emp where tab1.col1 = tab2.col2 and tab2.col2 = tab3.col3 ; 1) Tabs inserted for all columns and all keyword like select,from... 2) New Lines after all columns 3) A terminating semi-colon at the end of the etc etc... Which would be the easy route ? AWK, SED or PERL ? Thanx in advance ! -Mike |
|
#2
|
|||
|
|||
|
>Which would be the easy route ? AWK, SED or PERL ?
There is never any contest, Perl is the way to go in every situation I've encountered. Hell, I've practically replaced my shell scripting needs with Perl scripts. ![]() |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Formatting using AWK, SED, PERL |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|