0

I've written a simple bash script, named ocropus:

#!/bin/bash
read filename path
...

And then i realized that I can't run it like this:

ocropus filename path

Instead, I need to run it like this:

ocropus
filename path

What can I do so I don't need to hit enter before my inputs? Thanks a lot!

1

1 Answer 1

1

Command line arguments are in $1, $2, etc. So do:

filename=$1
path=$2

instead of

read filename path
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.