Index

Subject : Re: LUG: Schedule for the coming semester - ideas

From : Yanglei Zhao <z12y12l12@gmail.[redacted]>

Date : Sun, 10 Jan 2010 16:28:08 -0500

Parent


Yep, that makes the keyboard looks newer.

On Sat, Jan 9, 2010 at 11:17 AM, Edward Anderson < nilbus@nilbus.[redacted] > wrote:
Another incredibly useful bash ! shortcut is !!, which is a shortcut
for the entire previous command.

$ /etc/init.d/apache restart
permission denied
$ sudo !!     # this is equivalent to sudo /etc/init.d/apache restart
restarting apache... [done]


Then there's !$, which is the last argument to the previous command.
$ mv oldname newname
$ git add !$    # this is equivalent to git add newname
$ vi !$       # this is equivalent to vi newname

makes life easier :)

On Sat, Jan 9, 2010 at 10:59 AM,  < jpgoel@ncsu.[redacted] > wrote:
> Its a bash trick. Say your bash session looks like:
>
> vim foo.java
> javac foo.java
> java foo
> [repeat]
>
> "!vim" expands to the most recent history item that starts with those
> letters. "!vim" would execute "vim foo.java". This will save you millions
> of keystrokes during your programming career, thus increasing the life of
> your keyboard.
>
> So now you can say:
>
> !vim
> !javac
> java foo
>
> (note that you can't say "!java" after "!javac", since the string "java"
> matches the first letters of the history item "javac". Thus !java will
> execute javac.)
>
> Of course this works with any command.
>
> ls /media/cdrom/path/to/folder
> vim files.txt
> # hey i forgot what was in my folder. what's that path again?
> !ls
>
> Jay
>
> On Sat, January 9, 2010 10:42 am, Karl Nilsson wrote:
>> As for presentations, the one subject I am most interested in is
>> OpenCL. Not exactly linux-related, but is definitely an important
>> upcoming technology. Also the NIST SHA-3 competition, specifically the
>> algorithm design.
>>
>> I'd be more than happy to help with the FOSS fair. I enjoyed it last
>> year, and hope there's another one this year (although I don't see any
>> mention of it on the osi wiki)
>>
>> As for e115, we could always impress the freshman with a demo of
>> compiz + wiimote (OMG SPINNAN CUBEZ!). Also, a Lucid Lynx release
>> party might bring in some people. And a third suggestion is show how
>> powerful linux is, for example its use in VCL. I'll bet that the vast
>> majority of students don't know how VCL works.
>>
>> I worked at Red Hat this past Summer (along with Alex), and could give
>> a short presentation about my experiences. I worked on Satellite QA.
>> Nothing big, maybe 5-10 mins
>>
>> Regarding ads, I think it would be a lot easier to do a cardboard
>> template and spray chalk, than using a chalk stick, but I don't know
>> what the cost would be. Also I'm not an artist.
>>
>> @jpgoel
>> what's the !java trick? I've been it perl/python land too long
>>
>
>