How to open an application using unix script ?
How to open another program in unix
Collapse
X
-
Tags: None
-
Just call the binary with whatever options you want. The below script calls the application 'ifconfig.'
[code=bash]
#!/bin/bash
# shell script to show how to call a program
# in this case, call ifconfig to set ip
# by: sicarie 2012-02-28
#calling ifconfig
/sbin/ifconfig -i eth0 192.168.0.10
#done[/code]
Most binaries are in /bin, /sbin, /usr/bin, or /usr/sbin. There are a few other places, but you should be able to locate them with either the whereis or the find commands.Last edited by sicarie; Feb 28 '12, 10:48 PM.
Comment