I'm trying to use the output of a command as arguments:The command:/home/alexandre/dropbox.py exclude add ls | grep -v photosI have to add a list of files, for example:/home/alexandre/dropbox.py exclude add a.txt b.txt c.txtls | grep -v photos will give me a list of all files except the folder photos.But if I use my command, the command adds exclusion for the file ls (which does not exist, I want to run the command ls).Anybody know how to do that?
pipe as arguments
linux;command line;arguments
What you are looking for is to execute the command in a subshell, like:/home/alexandre/dropbox.py exclude add $(ls | grep -v photos)