[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; s kriv tæller med foranstilled e nuller?



On Sun, 29 Mar 2009 11:12:43 +0200, Jon Bendtsen <sslug@sslug> wrote:

On 29/03/2009, at 10.21, Martin Møller Skarbiniks Pedersen wrote:

2009/3/29 Michael Schmidt <sslug@sslug>:

Aha! jeg tænkte ikke over at seq var en selvstændig funktion.
Jeg har heller ikke gennemskuet hvorfor det skal stå omkranset af " ` ", men sådan er det når man googler sig til en løsning baseret på at redigere en
lille bitte del af en andens forslag.

Overvej at bruge $(...) istedet for `...`.
Det er nemmere at læse og virker bedre, hvis man f.x. skal udprinte scriptet.

Desuden virker det i flere lag, altså

echo $(which $(history | tail -1))

Det er sikkert rigtig smart og nyttigt, men mit "problem" er at jeg ikke ved hvad syntaksen "dækker" / bruges til. Mit gæt (og det er et gæt) er at dette er den aktuelle returværdien fra den indre funktion, som så skifter ved hvert kald fra den ydre funktion.

Og så kan jeg godt se, og er enig i det er mere læsevenligt at skrive $(...) frem for `...` specielt hvis det bruges i flere lag.


--
Med venlig hilsen
/Zmit/
RLU # 314205


 
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] *