run perl script without pl extension as any other shell command
Hi, I will like to use my own perl scripts as any other command, I mean as "ls, chmod, cd, etc."
Example I have a perl script used to convert fastq file to fasta file and it is executed as:
perl fastxQA.pl [argument1] [argument2]
and I will Like to use just like:
fastxQA [argument1] [argument2]
I just moved the script fastxQA.pl to /usr/local/bin and I give the permission (chmod 700 fastxQA.pl) and it works like:
fastxQA.pl [argument1] [argument2]
but I will like to use it without the pl extension!
Right now I have few personal script and I will like to use like any other shell command; bye the way I have a Mac OS X
Thanks So Much!
• 2,293 views
•
link
0 answers
No answers yet.
Log in to answer this question.
Don't you think http://stackoverflow.com/ could be a better place to ask these types of questions?
It looks like you need to learn about command-line in general. Perhaps the book "The Linux Command Line", from W. Shotts, will be useful to you?
Hi !
Adding a personal script to
/usr/localshould be avoided. It would be better to create a dedicated folder in you home directory and add it to your path ($PATH).Have you tried removing the extension (.pl) from your script name?
Thanks Thibault D. It is really helpful!
Thanks!
Hello cabraham03!
We believe that this post does not fit the main topic of this site.
Basic unix shell question, not related to bioinformatics. Hint: the shell doesn't care about extensions.
For this reason we have closed your question. This allows us to keep the site focused on the topics that the community can help with.
If you disagree please tell us why in a reply below, we'll be happy to talk about it.
Cheers!