R
raphfrk
I have a program which reads in 3 filenames from the command line
prog filename1 filename2 filename3
However, it doesn't work when one of the filenames has spaces in it
(due to a directory name with a space in it) because that filename gets
split into 2.
I tried
prog "/blah/blah 2/filename1" "filename2" "filename3"
and it still splits on the space. (It included the " chars too).
Is there a quick fix that would be possible here? I realise that it
could be fixed by manually detecting the " and creating the 3
filenames. However, if there was a way to write the command line so
that isn't necessary, that would be better/easier.
prog filename1 filename2 filename3
However, it doesn't work when one of the filenames has spaces in it
(due to a directory name with a space in it) because that filename gets
split into 2.
I tried
prog "/blah/blah 2/filename1" "filename2" "filename3"
and it still splits on the space. (It included the " chars too).
Is there a quick fix that would be possible here? I realise that it
could be fixed by manually detecting the " and creating the 3
filenames. However, if there was a way to write the command line so
that isn't necessary, that would be better/easier.