LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to unpack source.n.gz (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-unpack-source-n-gz-644991/)

sky_amy 05-27-2008 12:33 AM

How to unpack source.n.gz
 
HI,
Can someone please help me. I have a file to be run with source command. But when run
> source .file

An error Command not found appeared. I typed whereis source and it gives me
/usr/share/man/man1/source.1.gz
/usr/share/man/mann/source.n.gz

How do I unpack the command source?

General Failure 05-27-2008 01:03 AM

Source is a bash builtin, so you won't have any executable, that's ok. I'd rather make sure .file is there. Is your .file really hidden? Try
Code:

source file
Note: This is without the dot.

seraphim172 05-27-2008 06:07 PM

The 'source' command is used to read a settings file. If one changes for example some profile settings in .bashrc, then 'source .bashrc' will read the file and make the settings available to the current environment.

Linux Archive

chrism01 05-27-2008 06:28 PM

Actually, source just inserts the (shell) file contents into the current env/file at the point where it is called.
Think of it as a dynamic include.
The sourced file can be any shell 'cmds', not just settings.
NB: source is a synonym for dot<space> eg

. file

is the same as

source file

sky_amy 05-27-2008 11:24 PM

HI General Failure,

I did run source file, but the an error no such file appeared. The file is really hidden. I tried using source with other files, and it works.

colucix 05-28-2008 12:03 AM

So there is a wrong command inside the file.

chrism01 05-28-2008 01:51 AM

Looking at post #1 again, that looks like man pages for the source cmd, in which case don't even try. Just do

man source

and the man tool will handle it for you.


All times are GMT -5. The time now is 08:56 AM.