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:
|
1462 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
|
|
|
|