10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I created a program, so a kid can practice there math on it. It dispenses varies math problems and the kid must input an answer. I also want it to grade the work they have done, but I can't find the best place for it to print out the grade.
I have:
if ( $response =~ m/^/ ) {
$user_wants_to_quit... (1 Reply)
Discussion started by: germany1517
1 Replies
2. UNIX for Dummies Questions & Answers
Hello,
So I have approximately 300 files of raw data (.txt) files that I am using to perform statistical analysis. I have been able to construct a Fortran program that is able to perform my statistical analysis on a file by file basis.
However, I now want to be able to loop program through... (19 Replies)
Discussion started by: Jimmyd24
19 Replies
3. Shell Programming and Scripting
Hi, I was hoping for help with a for loop to run a program (vina) repeatedly using all the files in a folder as input. Currently my code looks like this:
#!/bin/bash
FILES=/home/afalk/Desktop/battest/*.pdbqt
for f in $FILES do
vina --config /home/afalk/Desktop/A.txt --ligand "$f".pdbqt
done... (5 Replies)
Discussion started by: oldmanwinter
5 Replies
4. Homework & Coursework Questions
Long story short: I'm working inside of a Unix SSH under a bash shell. I have to code a C program that generates a random number. Then I have to call the compiled C program with a Perl program to run the C program 20 times and put all the generated random #s into a text file, then print that text... (1 Reply)
Discussion started by: jdkirby
1 Replies
5. Shell Programming and Scripting
I am using a very simple script (MUS) to process some files where the input file for the binary application I am running has to be named infile. So I have this:
#!/bin/bash
for i in {1..n}
do
mv block${i} infile
done
./dnadist <<EOF
D
Y
EOF
However, I want to use dnadist inside the... (3 Replies)
Discussion started by: Xterra
3 Replies
6. Shell Programming and Scripting
In the following script, I wish to invoke a compiled C++ program, consimv4 and pass it some command line arguments through the shell script's command line arguments and variables. But for some reason, when I run the script, I just return to the shell prompt and nothing happens. For the life of me,... (7 Replies)
Discussion started by: msaqib
7 Replies
7. Programming
I wrote a simple program that generates a random word 10,000,000 times.
I wrote it in python, then in C++ and compared the two completion times. The python script was faster! Is that normal? Why would the python script be faster? I was under the impression that C++ was faster. What are some of... (2 Replies)
Discussion started by: cbreiny
2 Replies
8. UNIX for Dummies Questions & Answers
Hi,
i want to write a script that executes a program (exec?) .
this program then requires a filename as input.
how do i give it this input in the script so the program will be complete run and close by the script.
e.g.
exec prog.exe
program then asks for filename
"enter filename:"... (1 Reply)
Discussion started by: tuathan
1 Replies
9. Shell Programming and Scripting
Hi all,
I don't know how to redirect a variable in this case:
while true
do
./ready_data
...
done
ready_data should read a file looking for an ID, if this doesn't exist then add the last ID seen into the first line.
When ID exists there is no problem, but when ID doesn't... (0 Replies)
Discussion started by: csecnarf
0 Replies
10. UNIX for Dummies Questions & Answers
I have a data file contain the following information:
1
2
3
4
5
10
11
30
90
300
9
29
and on and on
I need to create a program with give me the following data format:
Jon
A (2 Replies)
Discussion started by: bobo
2 Replies