[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ast-developers
Subject:    [ast-developers] 'redirect {n}<. ; ... ; cd /dev/fd/$n' works on Linux, fails on Solaris?
From:       <olga.kryzhanovska () gmail ! com>
Date:       2012-06-20 3:56:29
Message-ID: CA+OH3v1PX6yPheKU5H0F2u9jHX31jSp7qE8JTWAxLAuepJQDWQ () mail ! gmail ! com
[Download RAW message or body]

Can some one explain why the following statement works on Linux but
fails on Solaris 11?

ksh -c 'redirect {n}<. ; cd / ; cd /dev/fd/$n ; /bin/pwd ; true'
will print the current cwd name on Linux.

But on Solaris 11 I'll get:
ksh[1]: cd: /dev/fd/10: [Not a directory]
/

Why?

Olga
-- 
      ,   _                                    _   ,
     { \/`o;====-    Olga Kryzhanovska   -====;o`\/ }
.----'-/`-/     olga.kryzhanovska@gmail.com   \-`\-'----.
 `'-..-| /       http://twitter.com/fleyta     \ |-..-'`
      /\/\     Solaris/BSD//C/C++ programmer   /\/\
      `--`                                      `--`

_______________________________________________
ast-developers mailing list
ast-developers@research.att.com
https://mailman.research.att.com/mailman/listinfo/ast-developers
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic