Running a Script/Executable From Within a Script


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Running a Script/Executable From Within a Script
# 1  
Old 01-24-2009
Running a Script/Executable From Within a Script

Hello,

I am new to Unix. I am trying to run a shell script (1node.sh) from within a Bash script that I created. I get the following error:

command not foundh: line 30: 1node.sh

I used Crimson Editor to make the Bash script. The weird thing is that 1node.sh will execute if I type 1node.sh in the terminal. However, when I implement
1node.sh in my bash script I get the above error. This is very weird. Thanks in advance.

modey3


# 2  
Old 01-25-2009
try specifying absolute path for the script in calling script.
# 3  
Old 01-25-2009
Your command should look something like this:

/dirpath/dirpath/./1node.sh
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Making any script executable

Hi all, I'm new to Unix so just wanted some help. I've been self learning and came accross a question online that I was trying. It is to make any shell script executable, the name of the file is to be made executable. I would use nano and type in something like #! /bin/bash Chmod +x... (4 Replies)
Discussion started by: HelenaR
4 Replies

2. Shell Programming and Scripting

Script will keep checking running status of another script and also restart called script at night

I am using blow script :-- #!/bin/bash FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not if then # echo "process found" exit 0; else echo "process not found" exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies

3. Shell Programming and Scripting

How to produce a executable Oracle script from bash script?

Hi here's my code ${ORACLE_HOME}/bin/sqlplus /nolog <<!EOF --step 5 create db script start set feedback off set heading off set echo off conn / as sysdba spool ${ORACLE_SID}_db_link.sql SELECT 'CREATE '||DECODE(U.NAME,'PUBLIC','public ')||'DATABASE LINK '||CHR(10)... (2 Replies)
Discussion started by: jediwannabe
2 Replies

4. Shell Programming and Scripting

Creating executable script--please help

Hi group, I am very beginner in shell scripting and self learning. I am trying to create and executable script to run awk from user defined variables. e.g. suppose from a given file I want to delete some rows or some columns We need to repeat this process for many files. Thus I was... (4 Replies)
Discussion started by: smitra
4 Replies

5. UNIX for Dummies Questions & Answers

Running Executable in Bash Script

Hey guys, so I've been trying to write a bash script called runSorter.sh that runs an executable that also takes in some parameters and outputs the results to a text file. The executable, sorter, takes in a number parameter. I want to make it so that you can input as many number parameters into... (4 Replies)
Discussion started by: Duo11
4 Replies

6. Shell Programming and Scripting

Unable to make script executable

Hello everybody, I'm unable to make my shell script an executable file. The details are as follows: PATH includes my $HOME/bin i.e. /rchome/rc1/bin HOME directory is /rchome/rc1 script name is prep_mig.sh permissions set are 755 It's executing if I give below command sh prep_mig.sh but... (4 Replies)
Discussion started by: jitu.keshwani
4 Replies

7. Shell Programming and Scripting

script run when executable is launched

I need to know how to have a BASH script run every time Firefox is launched, what is the simplest way to do this? (1 Reply)
Discussion started by: glev2005
1 Replies

8. Shell Programming and Scripting

Unable to call executable from script

Now I am using the HP-UX11.11 version. The scripts are runninh in KSH shell. While I wan to call one executable of any Pro*C file, I have got the following error, however the executable is running fine directly. testpri Started at 10.05.200923:40 /usr/lib/dld.sl: Bad magic number for... (0 Replies)
Discussion started by: priyankak
0 Replies

9. UNIX for Dummies Questions & Answers

running command prompt executable file in shell script

hi i have file extentioned with test.vbs. i am able to run this file n execute through command promt but i dont know how to run in shell script example: file name is test.vbs which contains strSoundFile = "C:\windows\Media\Notify.wav" Set objShell = CreateObject("Wscript.Shell") strCommand... (5 Replies)
Discussion started by: atl@mav
5 Replies

10. UNIX for Dummies Questions & Answers

need help making a script executable

making a script in vi to create a shell script called wherearethey by entering the following script: echo -n "Who are you looking for: "read userif then list=`w | grep $user | cut -c19-30` if then echo "The user $user is logged in from $list" else echo "The user $user is not logged in... (3 Replies)
Discussion started by: curtner
3 Replies
Login or Register to Ask a Question