Search Results

Search: Posts Made By: rubin
30,446
Posted By rubin
If the blank line between CREATE TABLE paragraphs...
If the blank line between CREATE TABLE paragraphs is always present this should suffice:

awk '/CREATE TABLE/{ n++; print > (f="out_" n); close(f)}' RS= sql_file

Otherwise use,

awk...
4,163
Posted By rubin
Maybe something like this, wd=10 awk -v...
Maybe something like this,
wd=10

awk -v wd="$wd" -F: '$NF=$NF-wd' OFS=: file > temp && mv temp file
Try it first on some test files.
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 07:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy