[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Usage of grep - Was: no .bash_hostory file was found in user home folder



On 20.Okt.2013, at 00:51, Ralf Mardorf wrote:

> 
> 
> On Sun, 2013-10-20 at 03:42 +0500, Muhammad Yousuf Khan wrote:
>>        cat /etc/passwd | grep ykhan
>>        ykhan:x:19000:19000:ykhan,,,:/home/ykhan:/bin/bash
> 
> [rocketmouse@archlinux ~]$ grep rocketmouse /etc/passwd
> rocketmouse:x:1000:1000::/home/rocketmouse:/bin/bash
> 
> IOW if you use grep, then you don't need to use cat first.


I find myself doing this on occasion.
Sometimes it seems quicker to add the pipe to the previous command than to modify the whole thing.

Knowing your shell's command line shortcut's helps with that, at least maybe.
I recommend the emacs tutorial (bash command line navigation is emacs-ish by default)

-- 
Markus

Reply to: