Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] [BASH] wywloywanie skryptow z tym samym parametrem
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Polish OTW
View previous topic :: View next topic  
Author Message
soban_
l33t
l33t


Joined: 27 Aug 2008
Posts: 668
Location: /home/soban

PostPosted: Sun Jun 17, 2012 3:55 pm    Post subject: [SOLVED] [BASH] wywloywanie skryptow z tym samym parametrem Reply with quote

Tak jak w temacie, mamy sobie n-skryptow np: damian.sh, maciek.sh i ala.sh. Wszystko znajduje sie w jednym katalogu i chcialbym wywolac kazdy z tych skryptow z jednym parametrem np status. Myslalem ze cos takiego podziala:
Code:
./*.sh status
jednak on przyjmuje jakos dziwnie ten argument i zwraca tak jakby niepoprawna wartosc przekazywanego argumentu w moim skrypcie. Ma ktos na to jakis sposob? (-:
_________________
gg: 525600


Last edited by soban_ on Sun Jun 17, 2012 5:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
SlashBeast
Retired Dev
Retired Dev


Joined: 23 May 2006
Posts: 2922

PostPosted: Sun Jun 17, 2012 4:57 pm    Post subject: Reply with quote

Code:
for i in ./*.sh; do "${i}" status; done


Podstawy shella sie klaniaja.
Back to top
View user's profile Send private message
soban_
l33t
l33t


Joined: 27 Aug 2008
Posts: 668
Location: /home/soban

PostPosted: Sun Jun 17, 2012 5:05 pm    Post subject: Reply with quote

wiem, ale jakos nie moglem na to wpasc (zacma umyslu), dziekuje.
_________________
gg: 525600
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Polskie forum (Polish) Polish OTW All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum