Red Hat

  www.redhat.com
  www.redhat.com

Interview Question

Systems Engineer Interview

How do you store the output of a command into a bash

  variable.
Answer

Interview Answer

1 Answer

0

var=$(cmd1 2>&1 >/dev/null)

Q on Apr 12, 2012

Add Answers or Comments

To comment on this, Sign In or Sign Up.