How do I collect user input and store in variables to use in parameters for jar file execution?
Tried using read -p and bash's select command from following link but get errors: How do I prompt for Yes/No/Cancel input in a Linux shell script? here is what I have so far:
#!/bin/bash
echo "Hello "$USER"."
echo "Enter System :"
read name
echo "Enter Format (JPG/PDF):"
read format
java -jar ~/folder/myjar.jar -input ~/scripts/file -output$format ~/output/$name.$format
This partially works in that it produces output file but the name variable is lost, format variable is generated in string ok. Running this also generates the following errors: ": command not found" under hello user, " ': not a valid identifierame" after entering system name