Execution problem with repeat the same program with two set of same data
I got a program named as "fastq_to_fasta".
I got a long list of file all named as AB1 and AB2.
My input file is :
My desired output is write a work script or a text file look like this:
Actually all the long list of file need to do the same program like:
Does anybody know by using awk command or any other programming language can easy for me to get my desired output result.
Thanks a lot.
Last edited by Franklin52; 10-09-2009 at 08:18 AM..
Reason: Please use code tags!
Hi Franklin52
I try your code just now.
Unfortunately, It can't work
Do you have any other idea?
Actually I just want to produce a long list of below (based on same XXX_AB1 with XXX_AB2):
.
.
.
Thanks a lot for your help.
Last edited by Franklin52; 10-09-2009 at 08:58 AM..
Reason: Use code tags please!!!!!!
Thanks a lot Frankin52
I think I understand what you mean now.
Maybe I type some error and let you misunderstanding it.
Actually all the *_AB1.fq and *_AB2.fq all are long list of "file" not the list of "contents" in a file.
But it should be not a problem.
I just do
[code]
ls *.fq > file
cat file awk -F_ 'a[$1]{print "fastq_to_fasta "a[$1]" "$0; next} {a[$1]=$0}' file [code]
I believe it should be work nice.
Thanks a lot and again, Frankin52
[/quote]
---------- Post updated at 08:33 PM ---------- Previous update was at 07:35 PM ----------
Thanks again Franklin52.
Your suggestion code look cool
I will go and find out the reason why you write this code.
Thus able to edit it next time to solve another similar problem.
In between, can I roughly know the explanation of your code written?
Sorry if bring you any inconvenience.
Thanks a lot for your explanation, Franklin52
I feel more comfortable and understanding about the reason of your code now.
I really appreciate for your explanation.
Thanks again
I need UNIX scripts for polling, Uncompressing files and moving files between directory. Also trying to save file paths and any other variables in an independent file (.env) and use these at runtime by executing this file in the main script. (3 Replies)
//Find the root of the equation (x^2)-2 by bisection method.
#include<iostream>
using namespace std;
double a,x;
double f(double x)
{
return ((x*x)-2);
} //Suppose the function is (x*x)-2.
void calcx(double a1,double b1)
{
x =... (2 Replies)
I have made use of 'valgrind' and -finstrument-functions compiler option for debugging / analyzing code. Both the options lets us know the line / file being executed to some extent.
Is there a generic way that lets program dump the file:line it is getting executed dumped to a log file during... (3 Replies)
Hi,
I wanted to know if i can write a program using switches and signals, etc to trace execution of other unix program which calls c program internally.
If yes how? If not with signals and switches then are there any other methods apart from debugging with gdb/dbx. (3 Replies)
Hi,
I have a shell script with code
. perf.env
cd $QRY_DIR
for SHELL_FILE in sql1
do
export SNAME=$SHELL_FILE
${SCRIPT_DIR}/perf_qry.sh ${SPOOL_DIR} ${DB_ENVNAME} ${NAME} &
RC=$(expr ${RC:-0} + $? )
sleep 60
if
then
echo sysdate>test1
echo query1.txt>>test1
grep -i... (6 Replies)
Hi,
I have a shell script with code
. perf.env
cd $QRY_DIR
for SHELL_FILE in sql1
do
export SNAME=$SHELL_FILE
${SCRIPT_DIR}/perf_qry.sh ${SPOOL_DIR} ${DB_ENVNAME} ${NAME} &
RC=$(expr ${RC:-0} + $? )
sleep 60
if
then
echo sysdate>test1
echo query1.txt>>test1
grep -i... (0 Replies)
Suppose that you want to mostly not echo commands inside your script during execution (e.g. to not bog the user down with details that they do not care about) but that there is the occaisional script line that you would like to echo before you execute it.
Is there an elegant way to achieve this?... (3 Replies)
I have a directory. To this directory, for Group bits combination, it is showing as 's'. Which I found out, it means "Set User ID on execution mode". Within this directory I am not able to create subfolder.
Does it mean, only the Owner of this directory will be able to create subdirectories &... (5 Replies)
I want group to run one of my unix script as me . I when the script is run it should have my permission's not the group .
I tried this :
1.Have a file called y.ksh
cat y.ksh
echo $LOGNAME >ak_test
2.Output file has this permission
-rwx------ ak_test
3.Then I chnaged... (7 Replies)