My goal is to automatically open a few specific files from calling a bash script.
P:\ = personal directory
Approach 1:
Example Code Below (filename: test):
run "P:\Notepad++\notepad++.exe" "P:\test1.txt" "P:\test2.txt"
Question 1: When I do "./test" in the bash shell, it opens up Notepad++.exe with test1.txt and says "P:\test2.txt" doesn't exist. Create it?"
I have both test1.txt and test2.txt in the P:\ drive so I'm not sure why "test2.txt" doesn't exist. Is it only allowed to take one parameter?
Approach 2:
I tried to use an array approach, but it's not working.
array = ("P:\test1.txt" "P:\test2.txt")
run "P:\Notepad++\notepad++.exe" $array[*]
Now it opens up Notepad++.exe with none of the files open and says "P:\test2.txt)" doesn't exist. Create it?"
echo ${ARRAY[0]} Prints the entire array as a string... not sure why
SOLVED See answer below.
Thanks all who helped. Any elegant approach/solution is appreciated too :)