system2 function calls the soft connection command

when i use system2 call the lncommand,example,my test.R is:

file.create("a.txt")
dir.create("test")
system2("ln",args = c("-s","a.txt","./test"),stderr = T)
system2("ln",args = c("-s","a.txt","./test"),stderr = T)

run it
Rscript test.R and the echo $? is 0
How should I make it exit the script when "test/a.txt" exists

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.