Re: [OxLUG] CLI tricks

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Philip Allen
Date:  
To: Oxfordshire Linux User Group Discussion List
Subject: Re: [OxLUG] CLI tricks
I raise your "perl -e" to "perl -pi -e <expr>"
(file edit in situ).

Philip

On Wed, Jan 11, 2017 at 06:13:26PM +0000, Tina Friedrich wrote:
> Wouldn't count mutt a CLI trick as such :) That's more 'essential software
> that'll beat the pants of anything with a GUI'?
>
> I'd add 'vim' to that list...
>
> Anyway - for what I'd call CLI tricks I'll give you
>
> * <ctrl>r to search your command history
>
> * !!, !$, !^ and !*
>
> * brace expansion in bash ('echo h{e,a,u}llo {foo,bar}' or 'cp
> file{1,2,3} /tmp'
>
> * bash string/parameter manip capacities in general
>
> * bash arrays
>
> * cd -
>
> * '^string^string2' to re-run your last command with 'string' replaced by
> 'string2'
>
> * rename
>
> * find
>
> * xargs
>
> * perl -e (for when bash fails me :) )
>
> ...
>
> I think I could continue this list for quite some time :)
>
> Tina
>
> > mutt
> >
> > On Wed, Jan 11, 2017 at 02:02:47PM +0000, Paul Moore wrote:
> >> Hi,
> >>
> >> Thanks for the posts on editors. I'm currently updating a Gedit macro
> >> plugin, and will distribute it when I get it working.
> >>
> >> What are your favourite CLI tricks? In my environment, my favourites
> >> are,
> >>
> >> # pop up a terminal
> >> <ctrl><alt>T
> >>
> >> # close it
> >> <ctrl>D
> >>
> >> # MATLAB-style command recall
> >> bind '"\e[A":history-search-backward'
> >> bind '"\e[B":history-search-forward'
> >>
> >> Also see @climagic on Twitter - quite good if you need to animate a
> >> dancing rabbit in your terminal.
> >>
> >> Paul.
> >>
> >>
>


-- 
Philip Allen
9 Bardwell Road             
Oxford  OX2 6SU                         +44-1865-311711
United Kingdom