0

I'm trying to write a shell script that builds an iso image from an .asm file with several utilities. When you run the script from the command line it first asks the user where the file is and where the iso file should be. I want the script accept arguments the user passed as part of the command: ./mkiso foo.iso bar.asm? The two arguments would correspond to two variables, input and output. How do I do this? EDIT: I'm using Linux and my script is a bash script.

1
  • It depends on the shell you are using... Can you clarify OS, shell type (for example, "Linux, bash")? Commented Mar 23, 2013 at 19:33

1 Answer 1

1

mkiso:

#!/bin/bash
input=$1
output=$2
echo "input: $input, output: $output"

Run it with parameters

./mkiso aa.iso bb.asm

Output

input: aa.iso, output: bb.asm
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.