linuxspaces: Handle spaces in Linux filenames

Description Usage Arguments Value Author(s) Examples

View source: R/linuxspaces.R

Description

Convert spaces in filenames (" ") to linux-type spaces "\ ", needed when calling system() on macOS.

Usage

1

Arguments

txt

filename, which may contain ordinary spaces, e.g. "my file 1.txt"

Value

filename with modified spaces, e.g. "my\ file\ 1.txt"

Author(s)

Danail Obreschkow

Examples

1
2
3
4
5
6
filename = '~/Desktop/my file 1.txt'
command = sprintf('ls -l %s',linuxspaces(filename))
## Not run: 
system(command)

## End(Not run)

docore documentation built on Feb. 1, 2022, 5:06 p.m.

Related to linuxspaces in docore...