Search Results

Search: Posts Made By: climatron
6,768
Posted By climatron
And just to be a completist on this issue,...
And just to be a completist on this issue, building on scrutinizer's suggestion, here's the code that would do everything I asked for in the original message

awk 'NR>1{gsub(/[^\n]/,x,$1)}1' RS={...
6,768
Posted By climatron
The awk answer to this problem
This one intrigued me because I'm more of an awk person than a perl person...
awk '{print $2} NR==1' RS={ FS="} " ORS= file

I wasn't familiar with RS, FS and ORS as built in variables and now...
6,768
Posted By climatron
I don't read perl, but this solved my problem. ...
I don't read perl, but this solved my problem.

For reference, if I was testing for another character, e.g. between parenthesis or square brackets, are any of the above "{" or "}" special?

So...
6,768
Posted By climatron
Remove multiline text between brackets
I have some text in a file like so

This is {the
first day
of} my life.


What I would like as output is

This is
my life.


Any text between the curly braces is removed. In the...
Showing results 1 to 4 of 4

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