Search Results

Search: Posts Made By: JamesForeman
1,303
Posted By durden_tyler
Change all single-quotes to double-quotes in your...
Change all single-quotes to double-quotes in your shell script, like so -


$
$
$ cat word_extractor_script.sh
perl -p -e "s/^.*?$1/$2/" cleanme > CleanerExtract

sed "s/^/$1 /g"...
13,103
Posted By bartus11
Perl can do it for you ;) perl -0777 -ne 'while...
Perl can do it for you ;) perl -0777 -ne 'while (/(?<=Anna).*?(?=would)/s){print $& . "\n"; s/Anna.*?would//s}' file
Other way: perl -0777 -ne 'print $1 . "\n" while s/Anna(.*?)would//s' file
13,103
Posted By Scrutinizer
Hi Bartus11, I know, I did not try to provide a...
Hi Bartus11, I know, I did not try to provide a solution, I just tried to explain what a sed construction such as he used does, since it did not work as he expected (actually that was what he was...
13,103
Posted By bartus11
Try perl -0777 -ne '/(?<=Anna).*(?=would)/s;print...
Try perl -0777 -ne '/(?<=Anna).*(?=would)/s;print $&;' file or perl -0777 -ne '/(?<=Anna).*?(?=would)/s;print $&;' file
Showing results 1 to 4 of 4

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