powered by
Convert spaces in filenames (" ") to linux-type spaces "\ ", needed when calling system() on macOS.
linuxspaces(txt)
filename, which may contain ordinary spaces, e.g. "my file 1.txt"
filename with modified spaces, e.g. "my\ file\ 1.txt"
# NOT RUN { filename = '~/Desktop/my file 1.txt' command = sprintf('ls -l %s',linuxspaces(filename)) # } # NOT RUN { system(command) # } # NOT RUN { # }
Run the code above in your browser using DataLab