Execute file without extension


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Execute file without extension
# 1  
Old 02-18-2011
Execute file without extension

Hi,

I have some perl script with names like abc.pl etc. I am Solaris 9 and i am not able to run "abc", either I have to do perl abc.pl OR ./abc.pl.

Could you someone provide me an insight or reference on this. So that I can understand the basic, and apply it for my purpose.

Thanks John.
# 2  
Old 02-18-2011
what error you are getting ?

Does your file has execute permissions ?
# 3  
Old 02-18-2011
It is giving me following error :

Code:
bash: lgrep: command not found

# 4  
Old 02-21-2011
I can think of adding this command in my Env. Could you anyone point me to right link for this? Will this be a good option?

- John.
# 5  
Old 02-21-2011
It's a classic PATH problem.
Let's assume your perl file is in folder /abc/xyz
Update your PATH this way:
Code:
PATH=$PATH:/abc/xyz
export PATH

If you want this command for yourself update the PATH in your .profile file
# 6  
Old 02-21-2011
Unlike DOS/windows, your current working directory is not part of your path unless you specifically modify your PATH environmental variable to include it.
# 7  
Old 02-21-2011
I can see that i have other values, will running the above specified command, will clear out existing value.

I would like to run on root profile, just wanted to make sure it is safe to run.

PATH=/opt/ldap/sparc64/3.3.11:/opt/ldap/sparc64/4.5.20:/usr/bin:/usr/local/bin
_=/usr/bin/env
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Rename specific file extension in directory with match to another file in bash

I have a specific set (all ending with .bam) of downloaded files in a directory /home/cmccabe/Desktop/NGS/API/2-15-2016. What I am trying to do is use a match to $2 in name to rename the downloaded files. To make things a more involved the date of the folder is unique and in the header of name... (1 Reply)
Discussion started by: cmccabe
1 Replies

2. UNIX for Dummies Questions & Answers

File Extension Missing in file-$var.csv

I'm afraid this is a silly question but I can't figure it out. I have a script like so... echo "Enter DRDL Signature Version Number" read DRDL_Number mv signature_output.csv SERVICE_OBJECTS_S-$DRDL_Number.csv The resultant filename does not contain the .csv as follows.... (3 Replies)
Discussion started by: Cludgie
3 Replies

3. UNIX for Dummies Questions & Answers

Display the .csv extension files based on .done extension fine

Hi All, I want to fetch the files based on .done file and display the .csv files and Wil take .csv files for processing. 1.I need to display the .done files from the directory. 2.next i need to search for the .Csv files based on .done file.then move .csv files for the one directory ... (2 Replies)
Discussion started by: girija.g6
2 Replies

4. Shell Programming and Scripting

for loop other file with same name and different extension

Hi Friends, I am using the following command for i in `ls $PWD`; do cat $i > test && mv test $i; done But, I want to execute another command and write the output to another file with different extension but same name, like this I tried using this for i in `ls $PWD`; do... (2 Replies)
Discussion started by: jacobs.smith
2 Replies

5. Shell Programming and Scripting

Getting the file extension

I have a file n06-z30-sr65-rgdt0p25-varp0.25-8x6drw-test.cmod and I want to get the extension. At the moment I have set filextension = `echo $f | awk 'BEGIN {FS="."} {print $2}'` which of course does not work as there is a point in varp0.25 (13 Replies)
Discussion started by: kristinu
13 Replies

6. UNIX for Dummies Questions & Answers

creating separate directories according to file extension and keeping file in different directory as

unix program to which a directory name will be passed as parameter. This directory will contain files with various extensions. This script will create directories with the names of the extention of the files and then put the files in the corresponding folder. All files which do not have any... (2 Replies)
Discussion started by: Deekay.p
2 Replies

7. UNIX for Dummies Questions & Answers

About the file extension

Hi everyone, Can we know that which type of file is there without opening a file thanks in advance.... kunal patil (3 Replies)
Discussion started by: kunalpatil09
3 Replies

8. AIX

trim file name extension????

Dear Chaps, What will I do if, I am not sure about the length of the file name, but only one thing that I want to remove only the last extension. e.g. abcdXXXXXX.pqrXXXXX.asc (X is any character) I want to trim only .asc (or,watever) so that resultant file name would be like... (1 Reply)
Discussion started by: vishal_ranjan
1 Replies

9. Shell Programming and Scripting

Check file extension

Hi , I am FTPing the file. Once the file is FTPied I need to check whether that file currently transferred is of .xls and I need to convert the same to a flat file. What command to use to find the extension of the file?. Thanks Mahalakshmi.A (6 Replies)
Discussion started by: mahalakshmi
6 Replies

10. Shell Programming and Scripting

Need to execute 2 scripts, wait, execute 2 more wait, till end of file

:cool: I need to execute a shell script to do the following: cat a file run two back ground processes using the first two values from the file wait till those background processes finish run two more background processes using the next two values from the file wait till those background... (1 Reply)
Discussion started by: halo98
1 Replies
Login or Register to Ask a Question