Midwest Dev Chat

MidwestDevChat.com

  • The newest 15 messages in the super-cool #linux channel.

  • 10/09 16:23:54 Adolfo: Is there a name for when you set a variable for the purpose of a single command by prepending the assignment, like
    DEBIAN_FRONTEND=noninteractive apt-get install ...
    
  • 10/09 16:24:13 Adolfo: (so that I can google it to be more sure about its behavior)
  • 10/09 18:55:02 Ossie: I like this question, because I use it fairly often. It _isn’t_ exported. But then is there a difference between your copy and:
    DEBIAN_FRONTEND=noninteractive 
    apt-get install
    
  • 10/09 18:55:20 Ossie: (and because I don’t know the answer)
  • 10/09 18:55:51 Ossie: your copy would matter if you were doing e.g. `bash -c 'DEBIAN_FRONTEND=noninteractive apt-get install ...'` versus in a persistent shell.
  • 10/10 14:14:42 Adolfo: I'm guessing the only difference is that your copy leaves the new value in the variable and mine doesn't but I don't know enough about it to be confident that that's the only difference.
  • 10/10 14:15:41 Adolfo: Cute:
    vagrant@ubuntu-xenial:~/workspace$ DEBIAN_FRONTEND=noninteractive sh -c 'echo \ inside: $DEBIAN_FRONTEND'; echo outside: $DEBIAN_FRONTEND
     inside: noninteractive
    outside:
    vagrant@ubuntu-xenial:~/workspace$ DEBIAN_FRONTEND=noninteractive; sh -c 'echo \ inside: $DEBIAN_FRONTEND'; echo outside: $DEBIAN_FRONTEND
     inside:
    outside: noninteractive
    
  • *Usernames have been changed to protect the innocent.
We're currently 1106 members strong. Join us!
Request Invite

Check out all the cool channels!

Join the conversation!