Search Results

Search: Posts Made By: doutdes
4,475
Posted By doutdes
Algorithm
Well, I'll say that a possible workaround is to first look for the the first paragraph, then save it in an array and finally do the grep

If the grep returns nothing, then proceed to fill the array...
7,105
Posted By doutdes
using perl to search and replace
Hope this helps, I created a file prodtest for example

$ perl -pe 'if ( $_ =~ /hostname/ ) { s/test/prod/ }' prodtest

st oa_var="s_hostname">prod</host>
<host oa_var="s_name">test</host>...
34,886
Posted By doutdes
perl one-liner with xargs for multiple input files
First list the 6 thousand files in one column, then pipe the output to xargs, telling xargs to execute perl for each file, {} is where xargs with the -i option puts the input file.
the -i.org is for...
Showing results 1 to 3 of 3

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