escape characters in shell commands S Steven Kennedy Tue, May 24, 2011 2:45 PM As a different approach, you could just use the readLines function: length(readLines(D:\my_dir\my_file))