run(`...`),I want to return like the shell not process

Use Sys.which("samtools").