Just wanted to resolve a relative file path so that I can pass it as an absolute path to a program.
#!/bin/sh QCAD_DIR=/opt/qcad-2.2.2.0-1-prof.linux.x86 ABS_PATH=$(readlink -f "$1") cd $QCAD_DIR && ./qcad $ABS_PATH
Credits: Andy
The Practical Application of Linux and Opensource Technology, and Other Stuff
Just wanted to resolve a relative file path so that I can pass it as an absolute path to a program.
#!/bin/sh QCAD_DIR=/opt/qcad-2.2.2.0-1-prof.linux.x86 ABS_PATH=$(readlink -f "$1") cd $QCAD_DIR && ./qcad $ABS_PATH
Credits: Andy
Posted in IT Tips.
– July 31, 2010
0 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.