small script
im trying to make this small script to start up a
bunch of programs but i dont know how to make them start simoultaneously not one by one waiting for each other to be closed. then i want to include that script to be exectuted asking for permission somewhere but that would be simple... for the first part i really cant get it done |
[command] &
The ampersand (&) tells the program to execute in the background, allowing foreground processes to continue while it runs. So you could easily put as many commands as you need and have them start as close to sychronously as possible. |
thanks
thanks man you've really been of help
is there any equivalent to autoexec.bat to linux ? if there is how do i configure it to run my script but that will be after kde starts because all programs included in my script are using kde. thanks again |
Every distro has a file that executes upon boot, ~/.bashrc or ~/.bash_profile execute when someone opens a terminal, and every WindowManager (KDE, Gnome, Fluxbox, et cetera) all have their own. They also have startup directories (or similar) that should be well-documented on both this and their own sites.
|
just partially solve the problem(partially because not yet tested)
i read from here kde docs and i would like to quoute them that i have to put the scripts in my $KDEHOME/env/ and thats all i think Quote:
|
how can i ask for user input in the script ?
like " Do you want the programs to start ? Y/N" and do some ifs according to this also how do i jumpexit from a bash script ? |
script finsihed
i managed to pull this non-orthodox code out...
im not too familiar yet with bash shell scripting. i used mcedit to code it. it seems tought that if at line 1 i put "exitloop = 0" instead of "exitloop=0" it tells me it cant find program or function exitloop wich is rathre weird. at line 3 i've specified the programs i want it to run.i like it allot now i dont know if it will be displayed if i put it in $KDEHOME/env/ because it must be displayed in order for the user to be able to choose Code:
#!/bin/bash |
Quote:
Code:
echo "do you want to continue, yes or no" If you want to learn more, the book in my sig (which can be downloaded free - but I like having it in paper format) and this tutorial are very useful. |
Quote:
|
i already managed to do that in my last post here
have you tried my script ? |
yeah, got a bit carried away in my first post. The Until statement is nice but not necessary though. A simple 'exit 0' at the end of the script wouild have sufficed.
|
All times are GMT -5. The time now is 05:01 PM. |