extract string from filename
Jeff Kinz
jkinz at kinz.org
Fri Jan 13 11:55:01 EST 2006
On Fri, Jan 13, 2006 at 11:40:26AM -0500, Zhao Peng wrote:
> Kevin,
>
> Thank you very much! I really appreciate it.
>
> I like your "find" approach, it's simple and easy to understand.
>
> I'll also try to understand your perl approach, when I got time to start
> learning it. (Hopefully it won't be un-fulfilled forever)
>
> I have one more question:
>
> Is it possible to number the extracted string2?
>
> Say, the output file contains the following list of extracted string2:
>
> st
> region
> local
>
> Any idea about what command to use to number the list to make it look
> like below:
>
> 1 st
> 2 region
> 3 local
Pipe the output into "pr -n -T"
This is not pr's intended use, but it will work. -n option means "put
numbers on the lines, -T option means "No page breaks".
The "-n" option appears to be missing from the FC2 man pages.
--
Jeff Kinz, Emergent Research, Hudson, MA.
speech recognition software may have been used to create this e-mail
"The greatest dangers to liberty lurk in insidious encroachment by men
of zeal, well-meaning but without understanding." - Brandeis
To think contrary to one's era is heroism. But to speak against it is
madness. -- Eugene Ionesco
More information about the gnhlug-discuss
mailing list