![]() For example, I have Ant 1.9.1, but the Mac came with Ant 1.8.4. This way, I can override the standard commands that are in the OS. I did that to add in /usr/local/bin which I placed first in my path. You can modify $HOME/.bash_profile or $HOME/.profile if. Change your $PATH variable to add the directory that contains your commands to the PATH.Include the directory name when you eecute the command like /Users/david/foo or $PWD/foo or just plain.Use the command bash foo since foo is a shell script.There are several ways I can handle this issue: If it can't find a command foo in any of those directories, it tell me command not found. ![]() ![]() If not, it will see if there's an executable command /usr/bin/foo and if not there, it will look to see if /bin/foo exists, etc. If there is, it will execute /usr/local/bin/foo. If I type a command foo at the command line, my shell will first see if there's an executable command /usr/local/bin/foo. usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/david/bin Unix has a variable called PATH that is a list of directories where to find commands. I've been at this impass for two days now, so any input would be greatly appreciated! Thanks!! bash: MigrateNshell.sh: command not found This is what I type in and what I get when I try to run the file (HW is the correct directory) localhost:HW Mirel$ MigrateNshell.sh The process only takes a moment when I type it directly into the command line as none of these files are larger than 160KB and some are significantly smaller. Even if I cut the script down to just a single grep line (with the #! /bin/bash first line) I can't get it to work. I've tried using chmod +x FILENAME.sh and chmod u+x FILENAME.sh to try to make sure it is executable, but to no avail. sh file (Line breaks: Unix (LF) and Encoding: Unicode (UTF-8)) in the same directory as all the files used in the script. You no doubt get the picture.įor creating the shell script I've been starting in Excel so I can easily copy-paste/autofill cells, saving as tab-delimited text, then opening that text file in TextWrangler to remove the tabs before saving as a. The cat lines are to mash together the locus by site data created by all the grepping below the site-specific information dictated in the echo line. The echo lines are data about counts (basepairs per locus, populations in the analysis, samples per site, etc.) that the program needs information on. The second group of code creates the actual new file I need to end up with, that ends in. fasta files have the sequence information organized by sample ID the grepping works just fine in command line if I run it individually. The Samples.txt files have the sample ID numbers for a site, the. The series of greps are just pulling out DNA sequence data for each site for each locus into new text files. Grep -f locus5.fasta > Įcho 3 5 Salex_melanopsis > Smelanopsis.migĮcho 154 124 120 74 126 NFCup > Smelanopsis.migĬat > Smelanopsis.migĮcho 32 30 30 18 38 Salmon River > Smelanopsis.migĬat > Smelanopsis.migĮcho 56 52 24 29 48 Cascades > Smelanopsis.migĬat > Smelanopsis.mig Here are the details (I apologize for the length): #! /bin/bash I have gotten a number of functions to do exactly what I need independently when I type them into the command line, but when I put them all together in a script and try to run it I get an error. Anyway, we have been tasked with writing a shell script to take data from a group of files and write it to a new file in a format that can be read by a specific program (Migrate-N). I've been learning the basics from a bioinformatics and molecular methods course (we've had two classes) where we will eventually be using perl and python for data management purposes. I am very, very new to UNIX programming (running on MacOSX Mountain Lion via Terminal).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |