Re: words in file



On Sun, 26 Sep 2010 12:57:07 -0400, Marious Barrier wrote:

On 09/26/2010 08:22 AM, hipa wrote:
Hi

I want to print all the words, with an extention, in a simple text
file. For example, all the *.mp3 filenames must be printed on the
screen. Can anyone give me some tips,

Thx!

ls to get the file list of a directory and grep to filter them, using
regexp.

ls | grep -iP "\.mp3$" > list.txt

Sorry if I didn't explain it well. In a text file I have the sentence
"Test.mp3 is a music file". Now i'd like to print "Test.mp3". So
extracting the words with the mp3 extention.
.



Relevant Pages

  • Re: words in file
    ... Marious Barrier wrote in comp.os.linux: ... I want to print all the words, with an extention, in a simple text ... all the *.mp3 filenames must be printed on the ... if you ask in comp.lang.php I can make a php script for you, ...
    (comp.os.linux)
  • Re: words in file
    ... I want to print all the words, with an extention, in a simple text ... all the *.mp3 filenames must be printed on the ... Ask in comp.lang.php and I will write a php script for that. ...
    (comp.os.linux)
  • Re: words in file
    ... I want to print all the words, with an extention, in a simple text ... all the *.mp3 filenames must be printed on the ... ask in comp.lang.php I can make a php script for you, ...
    (comp.os.linux)
  • Re: words in file
    ... On 09/27/2010 01:25 PM, hipa wrote: ... I want to print all the words, with an extention, in a simple text ... all the *.mp3 filenames must be printed on the ... Thanks for the anwser. ...
    (comp.os.linux)
  • Re: words in file
    ... On 09/27/2010 10:41 AM, SINNER wrote: ... I want to print all the words, with an extention, in a simple text ... all the *.mp3 filenames must be printed on the ...
    (comp.os.linux)