Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Segregating a Global Alias



On Mar 24,  3:36pm, Bart Schaefer wrote:
}
} perl -pe '$. == 1 && open STDOUT,"> $ARGV.txt"; s/(<\/\w+>)/$1\n/g' NF
} 
} That'll work for a whole list of files just like the "for" loop.

Phil reminds me off-list that $. is not automatically reset when the
value of $ARGV changes, so for multiple files you actually need:

perl -pe '$. == 1 && open STDOUT,"> $ARGV.txt";
         s/(<\/\w+>)/$1\n/g;
         close ARGV if eof;' NF

which might make this answer less appealing.



Messages sorted by: Reverse Date, Date, Thread, Author