## open a pipe a <- pipe("mplayer -slave -quiet /media/wind/Music/a.mp3","w") write("get_file_name",a) ## send get_file_name command to player. ## ANS_FILENAME='a.mp3' write("quit",a) ## exit mplayer
Can I capture the output from mplayer into a R object? In this case, it is "ANS_FILENAME='a.mp3'". I try sink(), but it doesn't work as what I want to capture is not a return from R. Thanks. -- HUANG Ronggui, Wincent PhD Candidate Dept of Public and Social Administration City University of Hong Kong Home page: http://asrr.r-forge.r-project.org/rghuang.html ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.