Sponsored Content
Top Forums Shell Programming and Scripting Problem with script: ksh not found Post 302174547 by midhun_u on Tuesday 11th of March 2008 11:32:06 AM
Old 03-11-2008
Problem with script: ksh not found

Hello Guys,

what is the significance of using #!/bin/sh at the start of shell script.

my default shell is ksh, when i run my script i have ksh: not found error
and when i use ./myscript it works.

Can anyone explain me the problem please ?

tnx
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

ksh script and java problem

I have a problem with the execution of a ksh as deamon on linux. I explain you first the context. We have developped a Java program that execute every minutes an external (that we don't have developped) program with a config file in parameter. The Java program is runned as deamon with a perl... (0 Replies)
Discussion started by: adrian.mihai
0 Replies

2. Shell Programming and Scripting

Simple ksh script problem

This is a search script that I have developed. It finds the records that I look for. However the only thing I want the program to do now is to display a message such as 'Not Found' to appear when a record is not found. So far when a search doesn't display a record, the screen is blank. ... (14 Replies)
Discussion started by: Warrior232
14 Replies

3. Shell Programming and Scripting

Newbie problem with ksh script

Hi all, I have a directory have all of the .stat and .dat file : they are is a pipe separate flat file. Example: log-20061202.stat contain 1st line and last line of log-20061202.dat with record count of that day. Example: Total record = 240 Tom|02-12-2006|1600 W.Santa... (18 Replies)
Discussion started by: sabercats
18 Replies

4. Shell Programming and Scripting

Problem in ksh script ( String comparison )

hi , i am trying to compre two strings if ] or if ] when the length of var1 is small (around 300-400 char ) it works fine but when it is large (around 900-1000 chars) it fails is there any limitations for this type of comparison ??? (3 Replies)
Discussion started by: amarnath
3 Replies

5. Shell Programming and Scripting

Ksh problem in script

Hi I made a small script which uses ksh. When i run the script then i get the following error However when i run each of the commands on the commandline they get executed and provide the desired output. i cant figure out why the script is not running. Kindly Help Thanks in... (3 Replies)
Discussion started by: PradeepRed
3 Replies

6. UNIX for Dummies Questions & Answers

script sourcing problem (ksh)

I have a script "abc.sh" in /tmp which has exit 0 as its last line when I run this script from /tmp/xyz/def.sh script as . ../abc.sh then the script executes but the control doesn't return to def.sh script for subsequent commands in def.sh but if I invoke the abc.sh from inside the... (3 Replies)
Discussion started by: rakeshou
3 Replies

7. Shell Programming and Scripting

Shell script run error ksh: not found

Hi All, I am trying to run a script to FTP files from one UNIX server to another UNIX server. Actually I can able to FTP file successfully by manually or paste whole script at prompt. But when I am trying to run script it is giving error. Please let me know the cause. #!/bin/sh... (3 Replies)
Discussion started by: nz80qy
3 Replies

8. Shell Programming and Scripting

Crobjob Script to Email if Problem Found

I have a script that runs in cron twice every hour. My question is, when this script finds an error and sends an email on that error, and the error recovers how do i make the script only email when there's a problem and also when there's a recovery for that problem? simply inserting a "mail... (2 Replies)
Discussion started by: SkySmart
2 Replies

9. Shell Programming and Scripting

Read format problem in ksh script

I have ksh script reading file like while read -r line do echo $line sleep 1 #process_file $line done<$file_nm I want to write this line to another file after some manuplation.Put $line giving me line after changing line format(space removed).Please help me how can i read line by... (3 Replies)
Discussion started by: Mandeep
3 Replies

10. UNIX for Dummies Questions & Answers

problem in Executing script in ksh

Hi, I am in ksh. below mentioned 3 commands I executed at command prompt & got the expected results. csh source csh_infa <special command> Now I have to do this in the script in ksh. I entered it as it is. #!/bin/ksh csh source csh_infa <special command> Now after... (1 Reply)
Discussion started by: girish_kanak
1 Replies
suspend(1)                                                         User Commands                                                        suspend(1)

NAME
suspend - shell built-in function to halt the current shell SYNOPSIS
sh suspend csh suspend ksh suspend DESCRIPTION
sh Stops the execution of the current shell (but not if it is the login shell). csh Stop the shell in its tracks, much as if it had been sent a stop signal with ^Z. This is most often used to stop shells started by su. ksh Stops the execution of the current shell (but not if it is the login shell). ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
csh(1), kill(1), ksh(1), sh(1), su(1M), attributes(5) SunOS 5.10 15 Apr 1994 suspend(1)
All times are GMT -4. The time now is 06:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy