March 2002
Beginner
504 pages
10h 47m
English
| 1: | Which file descriptors are associated with STDOUT, STDERR and STDIN? |
| A1: | The file descriptors associated with STDOUT, STDERR, and STDIN are 0, 2, and 1 respectively. |
| 2: | Use printf to convert the numbers 16, 255, and 65535 into hexadecimal and octal. |
| A2: | You can use the following printf statements:
printf "0%o 0%o 0%o \n" 16 255 65535 printf "0x%x 0x%x 0x%x\n" 16 255 65535 |
| 3: | Given the following script:exec 4>out.txt exec 5>&4 exec 1>&5 date Where does the output from date end up? |
| A3: | The output ends up in the file out.txt. |
Read now
Unlock full access