Shell Script Not Running

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Shell Script Not Running
# 1  
Old 07-03-2011
Shell Script Not Running

Hi ,

I Am Getting The Following Error When Executing Shell Script E32 :No File This Are Steps I Have Done For Running The .

1) VI Command So It Opened Vi Editor

2) VI FILENAME.KSH In The File I Have Written A Program Like Below
echo date

3):WQ For Quit And Save. Hear I Am Getting The Error As E32:No File Name.

I Am Running Red Hat Linux 5.0 In VMWARE With Koren Shell .

# 2  
Old 07-03-2011
By default you script "FILENAME.KSH" might not be having executable permission.
Run this command.
chmod 777 FILENAME.KSH

Then run the script.
# 3  
Old 07-03-2011
This is vi message. Very strange, if you are really execute it as "vi filename.ksh".
Try in vi
:w filename.ksh

# 4  
Old 07-03-2011
Script not getting saved

Hi ,

Clarifying My Question In The VI Editor I Have Written A File Please Correct If My Procedure If Wring For Executing .
STEP 1. Opened VI Editor
STEP 2. VI FileName.KSH (eg :Test.ksh) In The Text.ksh I Have Return A Sample
Script As Below
echo date
STEP 3: Esc ---->:wq! Hear I Am Getting A Error As E32 :No File Name .


---------- Post updated at 01:25 PM ---------- Previous update was at 01:16 PM ----------

Originally Posted by yazu
This is vi message. Very strange, if you are really execute it as "vi filename.ksh".
Try in vi
:w filename.ksh

The First Thing The Script Is Its Not Getting Saved
When I Issued A Command :wq! To save And Quit I Am Getting The Below
E32:No File Name
# 5  
Old 07-04-2011
I suspect UR use of upper case has cause the error try lower case.
Possibly U reentered vi and did not see a warning and U could have a .filnam.txt.swp file existing.
In step 3 if U actually typed what U show after "3:" then that is the problem. To save a file or an edit of a file with vi use ":wq" in lower case.
# 6  
Old 07-04-2011
When you are in vi in command mode, type :

exclamation mark twice (only one should appear) then "date"
Enter this in command mode:
Only one "!" willl be displayed so what you will see is :

The current date will be inserted in the opened file, at the the place where your cursor is

To make the result of a command be printed into your vi opened file, use bang (exclamation mark)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Cp not working in shell script but running perfectly from shell

Dear All, I have script. Dest="" IFS=' ' for translation in $(echo $MY_MAP) do t1=$(echo $translation | cut -d"=" -f1) t2=$(echo $translation | cut -d"=" -f2| cut -d"," -f1) if then Dest=$UNX/$u_product_path/$u_study_path/$UNXTR/$t2 break; ... (4 Replies)
Discussion started by: yadavricky
4 Replies

2. Shell Programming and Scripting

Running 3 shell script parallel in another shell script

Hi, I'm trying to do teh below thing. I have a single script which uses 3 different parameters to do 3 different work like belwo. par1 -- it shuts down an instance par2 -- it shuts down an instance par3 -- it shuts down an instance Now I created a script... (7 Replies)
Discussion started by: bhaski2012
7 Replies

3. Shell Programming and Scripting

Changing shell from a script and running something from the new shell

Hi We use "tcsh" shell . We do the following steps manually: > exec ssh-agent zsh > python "" (in the zsh shell) I am trying to do the steps above from a shell script This is what I have so far echo "Executing " exec ssh-agent zsh python "" exit 0 Problem is... (5 Replies)
Discussion started by: heman82
5 Replies

4. Shell Programming and Scripting

Shell Script is not running

Hi, when iam running below command it is executing fine on my linux command prompt. java -jar Efile.jar but the same command iam using in Shell script it doesnt work and saying error Unable to access jar files. Flavour is Linux Redhat. pls help (1 Reply)
Discussion started by: Riverstone
1 Replies

5. Shell Programming and Scripting

Shell Script for continuously checking status of a another script running in background, and immedia

Hi, I want to write a script which continuously checking status of a script running in background by nohup command. And if same script is not running then immediately start the script...please help.. i am using below command to run script nohup & but in some... (9 Replies)
Discussion started by: ketanraut
9 Replies

6. Shell Programming and Scripting

Bash shell script to check if script itself is running

hi guys we've had nagios spewing false alarm (for the umpteenth time) and finally the customer had enough so they're starting to question nagios. we had the check interval increased from 5 minutes to 2 minutes, but that's just temporary solution. I'm thinking of implementing a script on the... (8 Replies)
Discussion started by: hedkandi
8 Replies

7. Shell Programming and Scripting

Shell script running command in different shell

Hi All, Is there any way where we can run few commands with different shell in a shell script ? Let's have an example below, My first line in script reads below, #!/bin/sh However due to some limitation of "/bin/sh" shell I wanted to use "/bin/bash" while executing few... (9 Replies)
Discussion started by: gr8_usk
9 Replies

8. Shell Programming and Scripting

How to tell which shell is running a script

I've been searching for a while and haven't found this answer anywhere. How can I tell which shell is running my script from within the script? For example, I have lots of older scripts that we are porting to a new Linux system. Many of the scripts start with ":" alone on a line, which I think... (12 Replies)
Discussion started by: sbaker
12 Replies

9. UNIX for Advanced & Expert Users

shell script not running

Dear Friends, OS: REDHAT ENTERPRISE LINUX ,nash version I am facing a peculier type of problem.A bash script ran yesterday does not run successfully today . Absolutely giving NO OUTPUT AT ALL. We have migrated recently from redhat linux 9 to REDHAT ENTERPRISE LINUX 4.4 recently .What... (3 Replies)
Discussion started by: vakharia Mahesh
3 Replies

10. Solaris

Running from Shell Vs running from RC script

Hi, i have a script which need to do behave differently when run as a startup process from init.d/ rc2.d script and when run manually from shell. How do i distinguish whether my script is run by init process or by shell?? Will the command /proc/$$/psinfo | grep "myscript" work well???... (2 Replies)
Discussion started by: vickylife
2 Replies
Login or Register to Ask a Question