today i wrote a simple shell script to run apps from the terminal
called it z.bash
#!/bin/bash
read -p "which app >>" name
cd /
cd applications
open $name.app
so that now when i write ./z.bash, i wd enter the name of app..and it wd run..and it works and its cool...
now what wd be better, is that if it doesnt find the app under applications, it should look under applications/utilities..
so what i want to ask is, can 'open' return an argument..
like i want to simply put..
if [open $name.app = FALSE] -----this is wrong-----
cd utilities
open $name.app
fi
so hopefully u get what i am asking..
i wd really appreciate any help..
thanks
called it z.bash
#!/bin/bash
read -p "which app >>" name
cd /
cd applications
open $name.app
so that now when i write ./z.bash, i wd enter the name of app..and it wd run..and it works and its cool...
now what wd be better, is that if it doesnt find the app under applications, it should look under applications/utilities..
so what i want to ask is, can 'open' return an argument..
like i want to simply put..
if [open $name.app = FALSE] -----this is wrong-----
cd utilities
open $name.app
fi
so hopefully u get what i am asking..
i wd really appreciate any help..
thanks