Hacker News new | past | comments | ask | show | jobs | submit | more shellbackground's comments login

Just leave USB stick somewhere in Nsk and I will catch it.



What is this supposed to look like? For me it was a lot of random colors.


It's a bash script. Execute it and it shows a dancing woman.

Edit: ok the bash thing is a red herring. It works if you just "cat lady".


you are right, I started out with piping it into less, to see if you are right and damn it if you are not right. I thought he did something with delays in the output. How and why does this work?


ANSI escape sequences. Your terminal interprets them like move cursor to row x, column y. Set color green. Etc.

https://en.wikipedia.org/wiki/ANSI_escape_code


Interesting? but why does bash execute the code from standard output instead of simply displaying it to the user?


It's not bash. You can remove the shebang line and cat the file, and it still works. It's simply your terminal interpreting the ANSI codes and displaying the contents of the file.


well a shell command if you can excuse my nitpicking. Had it been a bash script he wouldn't only have made a really nice easter egg but also found a security hole in curl.


Do somebody know how the images where created? I haven't found a tool that creates ascii art with that color quality.


or does anyone know of any other examples? i want to show this to my coworkers but this particular animation is a little lewd to be bringing into work.


Now that's what I'm talking about.


wat it just started to run.

I thought it was supposed to be piped for bash to be executed.

Are all `curl` just exposed to bash injections?


Scroll up. There's no tricks here.


So are you saying that bash is not actually executed but the characters are being printed on the screen and they looks as if the animation were still playing?

What I cannot understand from that explanation is how the animation time works. It should display the animation in chunks, with really fast frames, followed by pauses while it waits for data to be received.


Without downloading it (on my phone), I expect there are ANSI codes involved to move the cursor and control other aspects of the terminal:

https://en.wikipedia.org/wiki/ANSI_escape_code?wprov=sfla1


curl always goes to stdout if you don't redirect it. i'd guess the file is just padded so that the "animations" take longer.


No.


Impressive!


My super-quick checklist for new shells consist of only one point: does it decently support background tasks?

It seems that none of recently emerged shells had that point in their design:

- elvish: no (https://github.com/elves/elvish/issues/193).

- xonsh: no (https://github.com/xonsh/xonsh/issues/1959).

- fish: no (https://github.com/fish-shell/fish-shell/issues/238).


Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: