have been trying for a few weeks not to get this program running. I am newer to programming and it has definitely been a challenge. I think my problem arises with my if statement. I can get it to append the name to the new file, but it simply appends the whole sequence to the file rather than counting it. I am working with a fasta file that contains multiple sequences, the name starting with '>' and the sequence on one line below it. Here is my code. Please help, and thank you so much in advance!!
Edit:
The input file has multiple sequence within it, all with respective titles. they look something like this:
The output i would like to contain the name and the percent of Gs an Cs (totaled together)
My idea for the program was to have the user input the file, then the loop either append the line that contains the title to the file GCcontent.txt or to run through the counter i have set up and append it to the file GCcontent.txt
Moderator's Comments:
An opening CODE tag looks like [CODE]; not [/CODE]. And please display sample input, sample output, and code segments in CODE tags; not just code segments.
Last edited by Don Cragun; 03-12-2016 at 05:09 AM..
Reason: Fix CODE tags on code segments; add CODE tags on sample input and output.
The test or [ command needs a space around the = sign.
Not sure I entirely understand what you're after. An input sample, the desired output and a description of the logics connecting the two would definitely help.
I have a bash script that launches another problem. I need to run that program under a certain user account. The script itself is run using 'sudo <scriptname>'.
#!/bin/bash
myprogram=...
exec "$myprogram"
How would this be done? (1 Reply)
i have created two files named server and client then when i run the server program it says the server is waiting(./server 5555) then when i run the client program it says "client error:connection refused" can u plz help me to run it?:( (7 Replies)
Hey, im editing the passwd file so that when the user ben logs in it runs my assign program.
I changed the last column from
to
Then when i log in i get...
There is no problem with the program because it runs fine when i open it normally.
Any help much appreciated. (8 Replies)
Hello ,
I want to run some shell scripts in my perl script. I need to read the script's name from a file ( this file includes the name of all the scripts) and run the script one by one.. Please let me know how to go ..
Thanks in advance,
Radha (5 Replies)
Hi,
I have a program in /opt/local/bin, my path in my .profile is
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
however when i type the program name it cannot find it, however i know the program is in /opt/local/bin?
Thanks (2 Replies)
Hey can anyone tell me the korn script code to implement an interactive integer calculator using the shell's built in arithemetic expression evaluation (2 Replies)
Hello all sorry didnt know where to post it
i compiled simple program that using "System.getProperty("user.dir");"
now i compiled the program under directory foo and and its running great when i do "java myapp"
i included this directory in the $PATH env variable so i could see it fro any where... (1 Reply)
Im new and wanted to know if im in the unix terminal and lets say i want to run microsoft word for example. i go in and go into the HD and then keep going and i type ls and see that microsoft word.app is there. how do i run it from that? (4 Replies)
Please help, I have tried to run this program countless times and still nothing. Please tell me what I'm doing wrong.
$ cat>test
count=1
while
do
echo "5"
read number
echo $5
let count=count+ 1
done
exit 0
^C$ ksh test
$ ^C
$ ksh test
$
$ nothing happend (6 Replies)
Can someone help me debug a c program I am running? It gives me segmentation fault.
I want to turn on debugging. Can some one give the command to turn it on?
Below is the error I get:
Segmentation Fault (core dumped) (3 Replies)