linux - Utility off using an additional file descriptor? -



linux - Utility off using an additional file descriptor? -

i know can create file descriptor , redirect output it.

but can same thing without file descriptor.

when have utilize additional file descriptor.

when redirect without using file descriptor, i.e:

echo haha > dump.log

it's equivalent

echo haha 1>dump.log

1 file descriptor standard output.

2 file descriptor standard error, if want redirect error messages coming command, can utilize file descriptor

ech lol 2>dump.log

these cases need file descriptors.

for example, if writing script, contains naturally lot of commands, can utilize redirection many purposes:

log commands , execution in log file follow workflow of script log error messages in log file know if there error messages there error messages, or output want ignore, , can 'incinerate' redirecting /dev/null

linux

Comments

Popular posts from this blog

maven fortify plugin : Unable to load build session with ID XXXXX .. See log file for more details -

c# - Primavera WebServices does not return any data -

android - Display emoji panel with genymotion - keyboard/touch input? -