|
|
This may hurt cross-platform scripts
If you're writing a shell script that you want to take to another platform at a later time, you don't want to use non-posix features. If you're running that script on Solaris, you have to be even more careful as it's /bin/sh isn't posix compliant.
This may hurt cross-platform scripts
Agreed -- if portability across various UNIX flavors is paramount to your shell script's operation then one must obviously consider the aspect you describe. However, putting that aside (and of course one can always case the Shell substitution method to avoid its use) removing basename from multiple execution in the hundreds or thousands can be beneficial.
This may hurt cross-platform scripts
I did a trick with IFS=/ for a long time, starting back with some scripts that I wrote originally for SunOS in '95 that then needed to work in HPUX, AIX, and IRIX as well soon after: Here is an example that I just came-up with from foggy memory: |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.09 seconds |
|