[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [PROGRAMMERING] bash og sed



Hej Torben

Torben Andersen wrote:
Hejsa
Jeg er ved for sjov at lave et script i bash til konvertering af svcdfilm og vil selv lade det bestemme antallet af .mpg filer og lægge filnavnene over i et array. Jeg har rodet rundt efter information og forestiller mig noget med "ls -1", "sed" og et variabel array til filnavne (kan bash overhovedet det sidste). Jeg kan bare ikke finde ud af det; kan nogen af jer hajer komme med en ide :-)

Øhhh - jeg forstår ikke, hvad du skriver, men man kan gøre noget i stil med


  $ files=`ls -1 |awk '{ printf("%s:",$1) } '`
  $ file3=`echo $files |cut -f 3 -d:`

Her er delimiteren ':' som så ikke må indgå i filnavnet.

--PMM

--
+----------------------------------------------------------+
| Se TV over Internettet -- http://www.streamtv.dk/?p=test |
+----------------------------------------------------------+



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 22:44 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *