Search Results

Search: Posts Made By: rubin
28,121
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...
3,622
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 08:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy