[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: [TEKNIK] Bash for-loop; skriv tæller med fo ranstillede nuller?



On 28/03/2009, at 23.04, Michael Schmidt wrote:

Hej NG,
Jeg har lige brugt et bash for-loop:

]$ for i in `seq 1 126`; do wget http://www.example.org/contenpages/article$i.html ; done

-og er mega stolt over at have løst opaven selv :)

til at lade wget hente en række nummerede filer (kunne ikke få wget til at acceptere jokertegn) Dog stødte jeg på en gruppe af filer der var nummereret med foranstillede nuller (0) der så _ikke_ blev medtaget af min -nu knap så- smarte løsning.

Er der en nifty måde at tælle med foranstillede nuller?

hvad med 3 for loops inde i hinanden som tæller for hvert ciffer?
i stil med
	for x in 0 1 2 3 4 5 6 7 8 9; do echo $x; done
		for y in 0 1 2 3 4 5 6 7 8 9; do echo $y; done
			for z in 0 1 2 3 4 5 6 7 8 9; do echo $z; done


JonB




 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2009-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] *