Welcome to Incremental Social! Learn more about this project here!
Check out lemmyverse to find more communities to join from here!

Andrew15_5 ,
@Andrew15_5@mander.xyz avatar

There is a $[]?

Morphit ,
@Morphit@feddit.uk avatar

Huh, it's the same as $(( )) - arithmetic expansion.
I think it's deprecated and not in the bash manual, but it still seems to work.

Andrew15_5 ,
@Andrew15_5@mander.xyz avatar

It is? Weird. I know about deprecated backticks, but this... I guess it's so deprecated that very few people know about this. Now a bit more.

comador ,
@comador@lemmy.world avatar

Daily Linux user since Slackware 95, news to me too lol

fmstrat ,

Same camp, and know bash very, very, well. Crazy how you can always learn.

lobsticle ,

As an old Perl jockey, you can pry my backticks out of my cold, dead hands.

mitchty ,

Its deprecated kinda like `` should be $() https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xcu_chap02.html seach for arithmetic expansion or $[].

librecat ,

Given that their hand is over the mouse and not the keyboard/enter key, I assume they're gonna click close on the terminal :p

mipadaitu ,

Right click for paste, they have \n in the clipboard

mexicancartel ,

Afaik \n may not run a command. I have pasted multiline commands but they only seem to run after hitting enter

Ghoelian ,

Depends on the terminal I think. Pretty sure KDE's Konsole warns you that commands may be run when pasting something with newlines, but still allows it.

LostXOR ,

It definitely runs the command for me in GNOME Terminal. Pasting multiple commands at once runs everything but the last command.

MeanEYE ,
@MeanEYE@lemmy.world avatar

There is an exploit which addresses copy pasting things in terminal. Where you'd copy one thing, but when pasting you get more than you bargained for. Any decent terminal would ignore \n for this reason or at least not treat it as pressing enter.

nebula42 ,
@nebula42@lemmy.today avatar

Well they did have the type the command, and to do that they would first have to navigate to the terminal (assuming the machine isn't running just a plain tty) first.

SpaceNoodle ,

root shell? Already playing it fast and loose, I see.

mlfh ,

The only legitimate commands for a non-root shell are sudo -i, exit, and echo "yee haw"

Korne127 ,
@Korne127@lemmy.world avatar

yee haw

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • linuxmemes@lemmy.world
  • incremental_games
  • meta
  • All magazines