|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
Can anyone tell me how to source a file inside a KSH script. I can do it in CSH using the "source" command. source /home/tipsy/sourceme.prf What is the equivalent command in KSH? I tried "exec" but after executing the statement no furthers statements are executed. Please let me know. Regards, Tipsy. |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
. /home/tipsy/sourceme.prf
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Thanks that worked.
I was trying . ./home/tipsy/sourceme.prf and breaking my head. Regards, Tipsy. |
|
#4
|
|||
|
|||
|
That would work if your current working directory is "above" where "home" is. So if "home" is somewhere like /u01/home, then, if your current working directory is /u01, then your attempt would work. Since you said that my suggestion worked, your "home" is mounted from "/" and will allways fail.
|
| Sponsored Links | |
|
|
#5
|
|||
|
|||
|
how to source a csh file from ksh
I have some common parameters established by setenv in a csh file.
I can "source" this file ( " source /path/aaa.csh " ) from inside a csh file and then access those parameters from the calling script. I wish to source the same csh file from inside a ksh script; but the ksh script processor refuses to recognize the #!/bin/csh statement in the csh file; and therefore refuses to process a setenv; it expects an export statement. (I used " . /path/aaa.csh " in the ksh script) I don't want to create a ksh version of this parameter file. Is there a way to source a csh file from a ksh calling routine? Thank for any insight and guidance you can provide. |
| Sponsored Links | |
|
|
#6
|
|||
|
|||
|
I have this exact, same question. Did you ever get an answer to come up with an alternate solution?
|
| Sponsored Links | |
|
|
#7
|
|||
|
|||
|
Did you ever get an answer OR come up with an alternate solution?
|
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Match the amount fields in the source file vs trigger file | vijaylak | UNIX for Dummies Questions & Answers | 4 | 12-28-2011 02:43 PM |
| Split File by Pattern with File Names in Source File... Awk? | cul8er | Shell Programming and Scripting | 2 | 11-25-2011 01:38 PM |
| how to copy downloaded file into my source file folder (putty/unix) | fakuse | Programming | 2 | 11-16-2011 05:44 PM |
| Post Shell programming: Question about source a file and read data from the file | ccwq | Shell Programming and Scripting | 3 | 08-04-2007 10:28 PM |
|
|