File not found!!!


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting File not found!!!
# 1  
Old 08-15-2010
Question File not found!!!

Hi all, I am new to UNIX.
i tried creating a new program and when i tried to run that in UNIX box it shows that file is not foundSmilie...
But the file i there with 777 permission.
Then my friend did a cat command to delete the spaces in the program and it works....
Can somebody explain what is happening...Smilie
# 2  
Old 08-15-2010
post your script please
# 3  
Old 08-15-2010
try run with full path
# 4  
Old 08-15-2010
If the name of the script contains space characters you need to put double quotes round the name when referring to that file name: "my script name".

It is bad practice in unx to create files with names containing spaces characters.
# 5  
Old 08-16-2010
Hi all,
Thanks for your replies.
The file name is not having any spaces.
Here is an similar simple code which is having the same issue...

#!/bin/ksh
###############################################################################
# Test script
###############################################################################

echo "Hi";
# 6  
Old 08-16-2010
Have you tried:

Code:
./scriptname

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

While loop a file containing list of file names until the files are found?

Hi, I have a control file which will contain all filenames(300) files. Loop through all the file names in the control files and check the existence of this file in another directory(same server). I need to infinitely(2 hrs) run this while loop until all the files are found. Once a file is found,... (5 Replies)
Discussion started by: laknar
5 Replies

2. Shell Programming and Scripting

Search row by row from one file to another file if match is found print few colums of file 2

this is the requirement list.txt table1 table2 table3 testfile.txt name#place#data#select * from table1 name2#place2#data2#select * from table 10 innerjoin table3 name2#place2#data2#select * from table 10 output name place table1 name2 place table3 i tried using awk (7 Replies)
Discussion started by: vamsekumar
7 Replies

3. Shell Programming and Scripting

Look for a file,if not found wait and look again

Hi All, i have a requirement I created a file list as below : more abc_file_list.txt Rem_DD.csv Rem_Non.csv Rem_Ld.csv CC_Ld_Non_IRA.csv ... Above are the 4 files (For now ,we dont know how many in the file) which need to be present else need to get an email for missing files. ... (3 Replies)
Discussion started by: dssyadav
3 Replies

4. UNIX for Dummies Questions & Answers

look for specific values in a file and rename file with value found

Hi, i have a file with some data ..look for some specific value in the file and if found that value rename the file with the value found in the file.. ex.. File.txt 1236 43715825601ANDERSSON, 1236 437158256031963040120060901200609010000000 1236 43715825604123 MCCL AVE UPPER 1236 ... (11 Replies)
Discussion started by: dssyadav
11 Replies

5. Shell Programming and Scripting

Modify a file by another file: add new line and variable after string is found

hello, I have problem with writing/adjusting a shell script. I searched forum and unfortunately couldn't write scipt based on the information I found. I never wtire such so it's hard for me and I do need to modify one script immediately. case looks like: 1. 'file' that needs to be modified... (3 Replies)
Discussion started by: bipbip
3 Replies

6. Shell Programming and Scripting

Search for file, give error if more than one file is found

Want to write a function that prints an error when passed a list of file names. If the file list is empty, print error "no file found", if there are more than one file, print "error more than one file found" (22 Replies)
Discussion started by: kristinu
22 Replies

7. Shell Programming and Scripting

Delete a pattern present in file 2 from file 1 if found in file 1.

I have two files File1 ==== 1|2000-00-00|2010-02-02|| 2| 00:00:00|2012-02-24|| 3|2000-00-00|2011-02-02|| File2 ==== 2000-00-00 00:00:00 I want the delete the patterns which are found in file 2 from file 1, Expected output: File1 ==== (5 Replies)
Discussion started by: machomaddy
5 Replies

8. UNIX for Dummies Questions & Answers

12. If an ‘88’ Record with BAI Code ‘902’ was found on input file and not written to Output file, re

This is my input file like this 03,105581,,015,+00000416418,,,901,+00000000148,,,922,+00000000354,,/ 49,+00000000000416920,00002/ 03,5313236,,015,+00231036992,,,045,+00231036992,,,901,+00000048428,,/ 88,100,+0000000000000,0000000,,400,+0000000000000,0000000,/ 88,902,+0000000079077,,/... (0 Replies)
Discussion started by: sgoud
0 Replies

9. Solaris

file not found (SOS)

Hi, friends, I am new here and also new in Unix. I want your kindly help for now! I cannot run the program vmed on my computer ,that reply the error $ vmed bash: vmed: command not found $ ./vmed ld.so.1: vmed: fatal: libpgplot.so: open failed: No such file or directory Killed as I... (12 Replies)
Discussion started by: wholesome80
12 Replies

10. Shell Programming and Scripting

how can i check in csh if command found or not found ?

hello all im trying to use in sun Solaris the information received from the top command now i several machines that dont have install the top program so when im running the script im geting error saying after im running this code : set MemoryInfo = `top | grep Memory` if (... (2 Replies)
Discussion started by: umen
2 Replies
Login or Register to Ask a Question