I wrote a .sh file to compile and run a few programs for a homework assignment. I have a \"for\" loop in the script, but it won\'t work unless I use only integers:
Here's another way. You can use a here doc to include your data in the script:
read -r -d '' data <
Similarly:
array=( 1.1 2.12 3.14159 4 5.05 ) for i in "${array[@]}" do ./hw3_2_2 "$i" done