grep - search for an "option" - text itself is a valid command parameter [solved - Printable Version +- Linux Lite Forums (https://www.freecinema2022.gq/forums) +-- Forum: General (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=4) +--- Forum: Off Topic (https://www.freecinema2022.gq/forums/forumdisplay.php?fid=15) +--- Thread: grep - search for an "option" - text itself is a valid command parameter [solved (/showthread.php?tid=5517) |
grep - search for an "option" - text itself is a valid command parameter [solved - Sprintrdriver - 08-09-2018 Hi folks. Have som beginner-issues using grep here. I'm up to search for the term "--prune-empty-dirs" in the man page of rsync. So I tried to ran this command: Code: man rsync | grep '--prune' -A1 -B4' Code: man rsync | grep '\-\-prune' -A1 -B4 Re: grep - search for an "option" - text itself is a valid command parameter [solved - kpanic - 08-29-2018 Use double quotes: man rsync | grep "\-\-prune" -A1 -B4 Please set the topic as solved even if you found the solution yourself. It saves time from the rest of us. Thanks! |