[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] 'Alle parametre undtagen en' i et bash-script



On Sat, Mar 18, 2006 at 11:11:08AM +0100, Jens Bang wrote:
> Nu mangler jeg bare én ting, for at det hele går op i en højere enhed. Jeg vil 
> gerne lade min bruger give en parameter, der er den streng der skal bruges 
> til (C)-beskeden, og så f.eks. angive *.jpg. Som her:
> 
> 	mitscript "En tekst" *.jpg
> 
> Men for at få *.jpg til at virke, så skal jeg bruge $@, som jo giver 'alle 
> parametre'. Hvordan undgår jeg at "En streng" bliver taget med som et 
> filnavn?

Du kan bruge 'shift' - se "help shift"

Mvh
Brix
-- 
Henrik Brix Andersen <sslug@sslug>
Gentoo Metadistribution | Mobile computing herd


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-04-01, 02:01 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] *