Re: locating a sourced file



On Thu, 31 Aug 2006 13:23:56 +0100, Robert Hull wrote:
On Thursday 31 August 2006 11:52, Angel Tsankov
<fn42551@xxxxxxxxxxxxxxxx> wrote in comp.os.linux.misc:

How can a sourced file determine its location?

Source files cannot determine anything - they are not executables.

I think the OP mean how can a sourced file (like in shell ./file.sh)
determine it's location. This sounds like home work so I won't answer
this directly but take a look at the variable $0.

--
Linux Home Automation Neil Cherry ncherry@xxxxxxxxxxx
http://www.linuxha.com/ Main site
http://linuxha.blogspot.com/ My HA Blog
http://home.comcast.net/~ncherry/ Backup site
.



Relevant Pages

  • object names from executable image files
    ... I was able to use log files from the past 18 ... batch programs to come up with a list of retirement candidates. ... Many executables are composed of multiple object files (the ... did I mention that the source files are COBOL? ...
    (comp.os.vms)
  • Re: locating a sourced file
    ... Neil Cherry wrote: ... Source files cannot determine anything - they are not executables. ... I think the OP mean how can a sourced file (like in shell ./file.sh) ...
    (comp.os.linux.misc)
  • Lahey Windows compilation problem
    ... the current working directory is on the C drive and source files are in ... I can compile and run programs. ... working directory is on a network drive, and sources are in the same ... I can create and run executables on the network drive with g95 without ...
    (comp.lang.fortran)
  • Re: Does VS.Net cache source files?
    ... the original source files were the ones that got corrupted. ... Only binaries if u use Windows 2003 where ShadowCopy makes copy of your executables. ... Michael Nemtsev:: blog: http://spaces.msn.com/laflour ...
    (microsoft.public.dotnet.general)
  • Re: Build 4 executables
    ... source files, while the other 3 have links to the source files (of the first ... But I need it to output 4 different executables everytime I build. ... The configuration manager lets me create any number ...
    (microsoft.public.dotnet.languages.vb)