This is a discussion on calling a script within a script within the Shell scripting forums, part of the Development/Scripting category; how do i go about calling a already existing script that i wrote from a script that i am currently ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
how do i go about calling a already existing script that i wrote from a script that i am currently writing? i want to call an awk script that i wrote, but i cant remember the syntax.
__________________
Gigabye GA-MA790X-DS4 AM2+ VGA XFX 8800 512mb AMD Phenom 9500 2.2gh AM2 G-Skill 2x2gb FSP Blue Storm 500w Plextor DVD+/- RW |
| Sponsored Links | ||
|
|
|
|||
|
first, you have to add something like following in your awk script:
PATH=:/bin:/usr/bin:/sbin:/usr/sbin=$PATH export PATH and then make the permission on the script as 755 and then put in the /sbin folder and then when you need to call this script from another script, you should call it smething like: /sbin/<awk_script> <<<<<<You have to mention the absolute path to your awk script. lemme know if it works. ALSO if you come accross any other efficient workaround, then please do let me know. |
|
||||
|
Code:
#!/bin/bash echo "My Host script" echo "Calling AWK script..." /path/to/awk/script.awk #or try awk -f /path/to/script # or try awk -f /path/to/script /path/to/data/file.txt
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| linux script | williamcty | Shell scripting | 0 | 12-20-2007 01:48 PM |
| problem in script | sania | Getting started tutorials | 0 | 09-14-2007 05:25 PM |
| script for mailing to user the o/p of the script | ricc | Shell scripting | 3 | 07-11-2007 05:59 AM |
| Need this script | karabaja | Shell scripting | 8 | 06-23-2006 05:55 AM |
| cut script | ricc | Shell scripting | 4 | 08-11-2005 10:59 AM |