I was trying to use file descriptor for printing the lines in the file
#!/usr/bin/ksh exec 3<&0 exec 0< file.txt while read LINE do echo “$LINE” done
and I am done with my code ,it prints the output as like my wish
I forgot to reset the file descriptor of 0
what will happen ?
- The descriptor scope will last only inside the program or entire unix shell?
- How we come to know which value is holding which file descriptor (printing the values of file descriptor using shell)
- It will automatically reset the system (AIX) is restarted ?