You're viewing a comment by ms68 and its responses.

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


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 handle, if you have one.)

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

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