1

Possible Duplicate:
In the bash shell, what is “ 2>&1 ”?

#echo "[+] Creating $count files" 
_remount 
create=$((time ./dirtest $testdir $count $size) 2>&1) 
Community
  • 1
  • 1
Anders Lind
  • 4,172
  • 8
  • 42
  • 59
  • 3
    From [this question](http://stackoverflow.com/questions/818255/in-the-bash-shell-what-is-21), it's a redirect of stderr to stdout. – simont Apr 14 '12 at 17:29

2 Answers2

4

It means that the standard error descriptor stderr (2) is to be redirected to the standard output descriptor stdout (1). Notice that the & ensures that the 1 is interpreted as a file descriptor and not a filename.

Óscar López
  • 225,348
  • 35
  • 301
  • 374
2

It redirects standard error to the standard output. This way the result written to stderr will be stored in the variable.

Karoly Horvath
  • 91,854
  • 11
  • 113
  • 173