shQuote
Quote Strings for Use in OS Shells

Description

Usage

shQuote(string, type = c("sh", "csh", "cmd"))

Arguments

string a vector of character strings.
type the operating system shell type. Can be "sh", "csh" or "cmd". If this value is missing and the operating system is Windows, it is set to "cmd".

Details

Value
returns the quoted string.
Examples

shQuote(getwd()) shQuote('foo/bar.txt', type="sh") # [1] "'foo/bar.txt'" shQuote('foo\bar.txt', type="cmd") # [1] "\"foo\bar.txt\""

Package base version 4.0.0-28
Package Index