![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with exec command and file descriptors?? | rfourn | Shell Programming and Scripting | 1 | 07-18-2007 06:05 PM |
| exec command and field descriptors.. | moxxx68 | UNIX for Dummies Questions & Answers | 5 | 12-04-2004 05:58 PM |
| file descriptors | a25khan | UNIX for Dummies Questions & Answers | 3 | 01-27-2004 07:46 PM |
| File Descriptors | shibz | UNIX for Advanced & Expert Users | 3 | 12-18-2002 10:12 AM |
| File Descriptors | s_chordia | High Level Programming | 2 | 12-24-2001 11:45 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Help with exec command and file descriptors II
Need to close files which descriptor number are larger than 9 in ksh.
'exec 10>&-' fails with 'ksh: 10: not found'. How do you specify file descriptors which occupies two or more digits in ksh script? Thanks, Masaki |
|
||||
|
At ksh, I can only close fd to 9 as your case.
But, I can do it by using Perl as the following test case. t1.c : open 10 files t2.pl : close fd from 3 t3.c : only wait a key to verify fds by using AIX 5.3 dbx's fd subcomamnd. At p2.pl use POSIX::close for ($fd=100; $fd > 2; $fd--) { # 100 is ok on my case. POSIX::close($fd) # execution error, but has effect. } exec "./t3" |
| Sponsored Links | ||
|
|