change directory and execute script
I'm trying to write a small program that gets 4 input values from the user and based on the first 3 values will change to a specific directory on a unix system. Using the fourth value it will execute a perl script in the directory. The fourth value is a variable in the script command line. What are some of the ways to get the program to do a CD and execute the script? Thanks for any suggestions/help. Steve
# 1
> I'm trying to write a small program that gets 4 input
> values from the user
you can use prompt for console app or build a gui
> and based on the first 3 values
> will change to a specific directory on a unix system.
skip that step
> Using the fourth value it will execute a perl script
> in the directory.
Runtime.exec() is what you need or something to that effect (Google)
> The fourth value is a variable in
> the script command line. What are some of the ways
> to get the program to do a CD and execute the
> script? Thanks for any suggestions/help. Steve
just execute the script using the full path, not sure CD will do anything for you