You're replying to a comment by ms68.

ms68 Permalink
June 15, 2012, 09:48

I m new to awk and shell scripts and need to modify one of the exysting shell script. I have understand most of the script excpet for following code.

awk '/^CREATE UNIQUE INDEX/{print "-- Create Unique Index #"++x}/^CREATE TABLE/{print "-- Create Table #"++y}/^CREATE (UNIQUE INDEX|TABLE)/,/;/{print}' $ORIGINAL_SCRIPT >> $TEMP_SCRIPT

sed s/'.PSY'/'.PS_'/g < $TEMP_SCRIPT > $MODIFID_SCRIPT

Can you please explain the code by breaking everything to understand. Specialy the awk code i.e. what ^ stands for and how and what awk is doing.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "lcd_122": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.