trick tip: sucker punch for forums/irc with rules

Talk about anything you feel like talking about. Pull up a soapbox and pontificate to your heart's content. May contain some adult humour or otherwise objectionable content (NSFW). No warez, pr0n or illegal stuff.

Re: trick tip: sucker punch for forums/irc with rules

Postby nodir » October 19th, 2018, 4:02 am

It's not that bash is missing stuff for me, it's that bash does too much and offers too many features

I see. Makes sense to me.
I mean, let's face it: bash's manpage mentions it itself ..

----
I gave dash a quick shot, as it was installed here (i was not sure which system shell was running). Jesus, what a fuck. No nothing. But something like 0.5 RAM reported by ps_me.

side note: mksh has history expansion too, btw. a given pain-in-the-ass command, say aboves awk line, can easily be repeated by typing the first part, in this case "mo" (like the mount), then hit the page-up key. Very cool stuff, but not that many seem to use it.
I am so used to hitting page-up all the time, that it happened per accident when using mksh (which i did only as the distro had it installed).
-
It is not a super-cool trick. Just one of the 5 things i know how to do on bash, which make me use it either comfortable or a bit faster. Course i could learn them in other shells. But, as said, such stuff is not as easy to be found as for bash (where you will get it with a simple websearch). But that is me, in general being rather lazy.
nodir
 
Posts: 307
Joined: June 16th, 2015, 10:10 pm

Re: trick tip: sucker punch for forums/irc with rules

Postby Head_on_a_Stick » October 19th, 2018, 9:06 pm

nodir wrote:mksh has history expansion too

Oh yes, I keep forgetting about that, thanks for reminding me :)

nodir wrote:I gave dash a quick shot, as it was installed here (i was not sure which system shell was running). Jesus, what a fuck. No nothing.

Have you tried busybox's built-in Almquist Shell?

Alpine Linux symlinks /bin/sh to busybox and has that as the default shell and it's very usable — the only things I missed were here strings and brace expansion otherwise I would be running that.
Show Off
User avatar
Head_on_a_Stick
 
Posts: 163
Joined: June 16th, 2015, 8:35 pm
Location: London baby!

Re: trick tip: sucker punch for forums/irc with rules

Postby golinux » October 19th, 2018, 9:14 pm

Note: There is nothing to "get over".
May the FORK be with you!
User avatar
golinux
 
Posts: 1117
Joined: July 23rd, 2011, 4:45 pm
Location: not a 'buntard!

Re: trick tip: sucker punch for forums/irc with rules

Postby Head_on_a_Stick » October 19th, 2018, 10:09 pm

golinux wrote:There is nothing to "get over".

I take it I can't interest you in a t-shirt then? :mrgreen:

Sorry for the OT, OP!
Show Off
User avatar
Head_on_a_Stick
 
Posts: 163
Joined: June 16th, 2015, 8:35 pm
Location: London baby!

Re: trick tip: sucker punch for forums/irc with rules

Postby golinux » October 19th, 2018, 10:42 pm

Head_on_a_Stick wrote:
golinux wrote:There is nothing to "get over".

I take it I can't interest you in a t-shirt then? :mrgreen:

Sorry for the OT, OP!

I don't wear any 'message' clothing. Not even for devuan.
May the FORK be with you!
User avatar
golinux
 
Posts: 1117
Joined: July 23rd, 2011, 4:45 pm
Location: not a 'buntard!

Re: trick tip: sucker punch for forums/irc with rules

Postby nodir » October 20th, 2018, 3:29 am

Head_on_a_Stick wrote:Have you tried busybox's built-in Almquist Shell?

Alpine Linux symlinks /bin/sh to busybox and has that as the default shell and it's very usable — the only things I missed were here strings and brace expansion otherwise I would be running that.

MIght be i ran in Almquist shell once (assuming it is called "ash.
But i seem to give the wrong impression: I hardly ever switch tools. I got hard times learning new things.
So: I do run in those other shells, but that's usually all i can say about them. (same for all other kind of applications. I prefer to live with the drawbacks instead having to learn something new, and be it only one single keyboard-shortcut :-) ).
Right now it's pretty silent, but the dragora IRC guys are also always in new/better things. Here and now i hear something, when they talk ...
(as mentioned: fossil instead of git, tmux instead of screen, musl instead of glibc, perp instead of runit instead of sysv/whatever, mksh instead of bash, and so forth, and so forth. Most of the time i got no clue what they speak of, so that i forget ... ).

alpine sounds as if it was worth a shot though. Sure a distro to keep in mind (for my laptops with 512 RAM or even less ... :-).

-
I wear whatever clothes i get for free ... Would love a shirt of Bones: Ripper and one of SantaCruz: the hand, both being evergreens. Skate clothes are ridiculous expensenive though. Even dickies, though i have heart in the US they are cheap, as it's workers clothes ...
iow: i am fine with any topic
nodir
 
Posts: 307
Joined: June 16th, 2015, 10:10 pm

Re: trick tip: sucker punch for forums/irc with rules

Postby Head_on_a_Stick » October 20th, 2018, 4:41 pm

golinux wrote:I don't wear any 'message' clothing. Not even for devuan.

The only slogan t-shirt I have is for the 20th anniversary OpenBSD release:

https://www.openbsd.org/images/tshirt-42.jpg#

I'm gonna have to buy all the ones since then though and make that my 6.4 donation, I am so grateful for the amazing work the devs are doing — I'm posting this from www/chromium running full pledge() & unveil() protection by launching it with
Code: Select all
/usr/local/bin/chrome --enable-unveil

^ This then renders the entire filesystem tree (except ~/Downloads) invisible to the browser, how cool is that?

And yes firejail does a similar thing but this is hooked into the OpenBSD kernel at a very low level and operates with a default deny policy (with a pre-defined whitelist for the permitted syscalls).
Show Off
User avatar
Head_on_a_Stick
 
Posts: 163
Joined: June 16th, 2015, 8:35 pm
Location: London baby!

Re: trick tip: sucker punch for forums/irc with rules

Postby fsmithred » October 29th, 2018, 3:10 pm

But if you want to show your foo:
How can i access the arguments/options not the last? so:
mkdir foo bar baz
and i want bar


Found it! Look at the Word Designators section in man bash (part of the HISTORY EXPANSION section).

Code: Select all
ls -h -t -r -l

then
Code: Select all
ls !!:3

translates to
Code: Select all
ls -r
fsmithred
 
Posts: 341
Joined: February 11th, 2011, 4:14 am

Re: trick tip: sucker punch for forums/irc with rules

Postby nodir » October 29th, 2018, 4:17 pm

ha ha. You crack me up. You got no idea how long i have thought: something like that would really be handy.
Great ! And thanks a lot.

most of the time i need "mkdir /home/user/stuff/more_stuff/even_more_stuff" ; cp file !$ (no idea whats the name of it though).
but now and then i could really need what you figured out.
nodir
 
Posts: 307
Joined: June 16th, 2015, 10:10 pm

Re: trick tip: sucker punch for forums/irc with rules

Postby golinux » October 29th, 2018, 4:20 pm

fsmithred definitely wins this round.

(golinux has no idea what it does though . . . )
May the FORK be with you!
User avatar
golinux
 
Posts: 1117
Joined: July 23rd, 2011, 4:45 pm
Location: not a 'buntard!

PreviousNext

Return to Nonsense

Who is online

Users browsing this forum: No registered users and 1 guest

cron

x