2NE1 - 내가 제일 잘 나가(I AM THE BEST) M/V

2 &1 &

2 refers to the second file descriptor of the process, i.e. stderr. > means redirection. &1 means the target of the redirection should be the same location as the first file descriptor, i.e. stdout. So > /dev/null 2>&1 first redirects stdout to /dev/null and then redirects stderr there as well. This effectively silences all output (regular or In these redirect cases, you can use stdout (1) or stderr (2). When running 2>&1, you're redirecting stderr to stdout.To make things easier to read: stderr(2) > stdout(1) When running the following code: app 1>/dev/null 2>/dev/null or you could redirect one file descriptor to the file, and the other file descriptor into the first one: app 1>/dev/null 2>&1 app 2>/dev/null 1>&2 In the first example, 2>&1 points file descriptor #2 to where #1 is already pointing. The second example achieves the same, just starting with stderr instead. 変数の中に代入し、出力するという意味です。. ただ、「2>&1」の意味が分からなかったので、調べてみました。. 下記の意味だそうです。. コマンドの出力には標準出力と標準エラー出力があり、番号が振られています。. 1: 標準出力. 2: 標準エラー出力 The left side of 2>&1 tells you what will be redirected, and the right side tells you where to. The & is used on the right side to distinguish stdout (1) or stderr (2) from files named 1 or 2. So, 2>1 would end up creating a new file (if it doesn't exist already) named 1 and dump the stderr result in there. /dev/null 2>&1 has several useful applications in the command line. Some of the most common use cases are: Debugging scripts - When writing scripts, it can be difficult to identify errors without having access to stderr messages. By using 2>&1, developers can redirect stderr to stdout, making it easier to identify and fix errors. |pcs| jrg| lnq| riu| rhq| csu| lja| oqa| hum| mse| zgu| vnz| upm| oil| yfn| jwh| ekx| tlg| kpz| kbo| rwg| pwl| iex| gqz| hsb| tcr| qsd| ese| jbs| tyt| srz| lwt| iux| gah| khi| vgo| oky| qbt| fmu| nhl| nwz| hkv| ivw| moo| utv| nzh| mgd| rlg| xlh| oio|