Search Results

Search: Posts Made By: rubin
3,665
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.
28,367
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...
Showing results 1 to 2 of 2

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