I have an example below where I need to replace the column 9 value if it is less than 8 else exit or ignore using sed or awk function:
) in datadbs extent size 16 next size 4 lock mode row;
) in datadbs extent size 16 next size 4 lock mode row; If I use the below awk function it only prints the value I need in column 9, but I still want to maintain the sentence structure.
echo ") in datadbs extent size 16 next size 4 lock mode row;" | awk '{if ($9 < 8 ) print 8;}'
echo ") in datadbs extent size 16 next size 4 lock mode row;" | awk '{if ($9 < 8 ) print 8;}' OUTPUT:
8
8 What I want is the below:
) in datadbs extent size 16 next size 8 lock mode row;
) in datadbs extent size 16 next size 8 lock mode row;