scy,
@scy@chaos.social avatar

TIL that you can

. <(some_command)

in bash to read bash-formatted variable assignments into the current environment. In other words, the dot ("source") command supports reading from process substitution.

some_command | . /dev/stdin

on the other hand does not work, I guess because it's running in a subshell…?

Replace some_command with something like echo foo=bar if you don't quite understand what I mean.

hilse,

yep, each command in a pipeline is executed in a subshell, according to the bash man page the last one might not (and rather run in the current shell context) if the lastpipe shell option is set

  • All
  • Subscribed
  • Moderated
  • Favorites
  • Bash
  • DreamBathrooms
  • mdbf
  • ethstaker
  • magazineikmin
  • cisconetworking
  • rosin
  • thenastyranch
  • Youngstown
  • GTA5RPClips
  • slotface
  • khanakhh
  • kavyap
  • InstantRegret
  • Durango
  • JUstTest
  • everett
  • tacticalgear
  • tester
  • osvaldo12
  • modclub
  • normalnudes
  • ngwrru68w68
  • cubers
  • Leos
  • provamag3
  • anitta
  • megavids
  • lostlight
  • All magazines