Here a C shell snippet get_script_path.csh to do the trick.

We have two ways to run the script, to illustrate why we need to handle differently, we print out the internal strings.

1. Source the script file

2. Directly run the script (need to chmod to allow execution).

After you understand what the script is doing. You can delete all the extra echo command in the script.




How To Get The Script Path Name in CSH/TCSH
Tagged on:         

4 thoughts on “How To Get The Script Path Name in CSH/TCSH

Please tell us what's in your mind ...

%d bloggers like this: