need a source command eqlnt

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Girish Kanakagiri
    New Member
    • May 2007
    • 93

    need a source command eqlnt

    Hi,

    In csh (C-Shell) we have source command

    source <file name>

    I need equivalent command for this "source" in ksh.

    Why I need:
    As I am running a script under ksh (K-Shell).
    I entered two below commands

    csh
    source .myfl
    <special command>

    script did not execute further, after executing csh.
    It got halted with "%" prompt. Later i typed "exit".
    It came back to ksh & tried to execute "source" but gave message source command not found.

    All the three commands I tried to execute from command prompt instead of script, it got executed & gave exact result as expected.
    Please help me. This is little urgent.

    Thanks & Regards,
    Girish Kanakagiri
    Last edited by Girish Kanakagiri; Jul 19 '11, 01:08 PM. Reason: Some more information added
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    Check out the korn shell man page and you will find that there are two ways to source a file in Korn shell. Either with the 'source' command or with a dot(.). For example:

    Code:
    . ./.kshrc
    This will source the .kshrc file in the current directory.

    Regards,

    Jeff

    Comment

    Working...