☑ This topic is solved.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 05-12-2022 01:22 PM
(1532 views)
I have 2 ksh (korn shell script) : file1.ksh and file2.ksh; and I want to have a master file ksh script that will call the 2 files; what's the code I have to put in my master file?
Thanks
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This isn't really a SAS question but a question about how to use korn shell so this may not be the best place to ask, but if you wanted to run one script from another wouldn't you just put the path to that script in your "master" script?
#!/bin/ksh
/path/to/file1.ksh
If you wanted to source the file rather than run it you could use the "source" command or it's alias, ".":
. /path/to/file1.ksh
or
source /path/to/file1.ksh
#!/bin/ksh
/path/to/file1.ksh
If you wanted to source the file rather than run it you could use the "source" command or it's alias, ".":
. /path/to/file1.ksh
or
source /path/to/file1.ksh
--
Greg Wootton | Principal Systems Technical Support Engineer
Greg Wootton | Principal Systems Technical Support Engineer
4 REPLIES 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
. file [arguments]
It is called the DOT command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I dont see your answer
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
I need please a sample code that will be in the master file
I m new in shell
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
This isn't really a SAS question but a question about how to use korn shell so this may not be the best place to ask, but if you wanted to run one script from another wouldn't you just put the path to that script in your "master" script?
#!/bin/ksh
/path/to/file1.ksh
If you wanted to source the file rather than run it you could use the "source" command or it's alias, ".":
. /path/to/file1.ksh
or
source /path/to/file1.ksh
#!/bin/ksh
/path/to/file1.ksh
If you wanted to source the file rather than run it you could use the "source" command or it's alias, ".":
. /path/to/file1.ksh
or
source /path/to/file1.ksh
--
Greg Wootton | Principal Systems Technical Support Engineer
Greg Wootton | Principal Systems Technical Support Engineer