To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.faqOpen lugnet.faq in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 FAQ / 467
466  |  468
Subject: 
autoFAQpost /off-topic/geek/cheap_win32_perl_one-liners.en.faq
Newsgroups: 
lugnet.faq
Date: 
Mon, 12 Jul 1999 23:35:38 GMT
Viewed: 
1325 times
  
Subject: What are some quick-n-dirty Perl one-liners for Win32?
Topic-Level: 2
Content-Language: en
Originator: Jeremy Sproat, 1999-05-19
Revision: Jeremy Sproat, 1999-05-19
Location: /off-topic/geek/

<P>Here ya go:
<DL>

<DT>print elements in the PATH, one per line</DT>
<DD><TT><PRE>path | perl -ne "s/^[^=]+=//i; print join qq(\n), split /;/;"</PRE></TT></DD>

<DT>Remove step lines from LDraw DAT files and put new files into a subcirectory named "nostep" (this useage of <TT>for</TT> probably works on Windows NT only)</DT>
<DD><TT><PRE>for %q in ( *.dat ) do ( perl -ne "print if !m{^ *0 +step}i" < %q > nostep\%q )</PRE></TT></DD>

<DT>example</DT>
<DD><TT><PRE>example</PRE></TT></DD>

</DL>
</P>



1 Message in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR