05-31-2011
Separating list of input files (*.file) with a comma in bash script
Hi all,
I'm trying to get a bash script working for a program (bowtie) which takes a list of input files (*.fastq) and assembles them to an output file (outfile.sam). All the .fastq files are in one folder in my home directory (~/infiles).
The problem is that the 'bowtie' requires that the input files are separated by a comma and with no space in between. E.g.:
infile1.fastq,infile2.fastq,infile3.fastq ...
Does anyone know how I could do this?
#!/bin/bash
fn=*.fastq
./bowtie [parameters] index_file ~/infiles/$fn outfile.sam &
How it should run at the end:
./bowtie [parameters] index_file ~/infiles/infile1.fastq,infile2.fastq,infile3.fastq,infile4.fastq outfile.sam
Your help is greatly appreciated!
Best
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
I was wondering if someone could help me writing a simple script on separating files into separate folders.
I have 92 files called various things and I want to separate these folders like so:
Create a folder called "1" and put files 1-23 in it
Create a folder called "2" and put... (5 Replies)
Discussion started by: hertingm
5 Replies
2. Shell Programming and Scripting
Hi,
I have file with text
________________________________
GROUP:firstname1.lastname1,first_name2.last_name2,first_name3.last_name3
HEAD:firstname.lastname
________________________________
I need help to pick the names separately ie..
Need out put
as
var1 =firstname1.lastname1... (4 Replies)
Discussion started by: rider29
4 Replies
3. Shell Programming and Scripting
I have a file with the contents below
jan_t=jan;feb_t=feb;mar_t=mar;year=2010
jan_t=null;feb_t=feb;mar_t=mar;year=2010
jan_t=jan;feb_t=feb;mar_t=mar;year=2010
I want to extract out all the fields values ending with "_t" , however, i want to exclude feb_t and mar_t from the results
In... (6 Replies)
Discussion started by: alienated
6 Replies
4. Shell Programming and Scripting
Hi,
I am having source (Oracle) as given below.
SourceOBJECT_NAMESUBOBJECT_NAMEOBJECT_IDDATA_OBJECT_IDOBJECT_TYPECREATEDLAST_DDL_TIMESTAMPSTATUSTGSTEST 336559336559TABLE4/15/2009 10:374/15/2009 10:372009-04-15:10:37:57VALIDNNNUNIX 336559336559TABLE4/15/2009 10:374/15/2009... (3 Replies)
Discussion started by: arunvasu2
3 Replies
5. UNIX for Dummies Questions & Answers
1) I wrote a script and gave the desired permissions using "chmod 755 scriptname". Now if i edit the script file, why do i need to set the permission again? Didn't i set the permission attribute.. or if i edit the file, does the inode number of file changes?
2) I am running my unix on a server... (1 Reply)
Discussion started by: animesharma
1 Replies
6. Shell Programming and Scripting
Hi,
I have this script
Script.sh:
#!/bin/sh
sed 's,\,,g' input.dat > output .dat
But i want to run it witb different files. So i want the input file as an input argument to the script, how could i do that.
Running it like this:
> Script.sh input.dat (2 Replies)
Discussion started by: Johanni
2 Replies
7. Shell Programming and Scripting
Hi All,
I need help for doing the following.
I have a input file like:
aaaaaaaaaabbbbbbbbbbbbbbbbbbbb
cccbbbbbaaaaaadddddaaaabbbbbbb
now I am trying to generate a output csv file where i will have for e.g.
0-3 chars of each line as the first column in the csv, 4-10 chars of the line as... (3 Replies)
Discussion started by: babom
3 Replies
8. Shell Programming and Scripting
Hello,
I'm trying to figure out how best to approach this script, and I have very little experience, so I could use all the help I can get. :wall:
I regularly need to delete files from many directories.
A file with the same name may exist any number of times in different subdirectories.... (3 Replies)
Discussion started by: *ShadowCat*
3 Replies
9. UNIX for Advanced & Expert Users
Hi,
I'm quite new to ksh scripting, can someone help me with this.
Requirements:
I need to create a script that list the files from a user input date range.
e. g. format of file:
*c1*log.2012-12-22-14-00*
*c1*log.2012-12-22-14-00*
*c1*log.2012-12-22-14-00*... (1 Reply)
Discussion started by: chococrunch6
1 Replies
10. Shell Programming and Scripting
hello guys
i have bash script to open my routers with username and password
i made script but i have problem this script can/t read password from file
#!/bin/bash
router_file="ips"
passwd="password.txt"
for router in cat ;$router_file do
for pass in cat ;$passwd; do
res=$(curl -m 1 ... (7 Replies)
Discussion started by: manhoud
7 Replies
LEARN ABOUT MOJAVE
tiffutil
TIFFUTIL(1) BSD General Commands Manual TIFFUTIL(1)
NAME
tiffutil - manipulates tiff files
SYNOPSIS
tiffutil <option> [<arguments>] [-out <outfile>]
DESCRIPTION
tiffutil lets you manipulate TIFF files. The list of options (also available by running the program without any options) follows:
tiffutil -none infile [-out outfile]
-lzw infile [-out outfile]
-packbits infile [-out outfile]
-cat infile1 [infile2 ...] [-out outfile]
-catnosizecheck infile1 [infile2 ...] [-out outfile]
-cathidpicheck infile1 [infile2 ...] [-out outfile]
-extract num infile [-out outfile]
-info infile
-verboseinfo infile
-dump infile
-none, -lzw, and -packbits options specify the compression format to be applied to the images in the TIFF file. -none specifies no compres-
sion; -packbits specifies PackBits compression; -lzw specifies standard Lempel-Ziv & Welch compression (no prediction scheme).
-cat allows combining multiple TIFF files into one. The images are copied without any change in tag values. If the real sizes (pixel size
divided by dpi) of the images being combined are not the same, a warning will be generated. This makes sure that NSImage can successfully
choose the right size image out of the generated TIFF file. Use -catnosizecheck to bypass the size check.
-cathidpicheck can be used to write an output file conforming to Apple's guidelines for resolution independent bitmap images, and will gener-
ate warnings if the supplied images do not have the recommended size relationship. For best results, ensure that the larger file has a file-
name of the form <basename>@2x.png.
-extract allows extracting an individual image from a TIFF file; specify num = 0 for the first image in the file.
-info prints information about TIFF images. -verboseinfo is the same, except most of the tables are displayed in full. -dump simply lists all
of the tags in the file without trying to interpret them; it is handy when trying to figure out why a TIFF file won't load or display prop-
erly.
For options which write images out, the output goes to "out.tiff" unless an output file name is specified after a -out keyword. This keyword
and the file must be the last items on the command line. -info, -verboseinfo, and -dump write their output to the standard output.
If there are multiple images in a TIFF file the specified operation will be performed on all of them.
SECURITY NOTE: This version of tiffutil SHOULD NOT be used with untrusted files.
CREDITS
Parts of tiffutil were based on the freely distributable "tiffcp" and "tiffinfo" programs written by Sam Leffler and made available with v3.0
of his excellent TIFF library. The TIFF library and the tiffcp and tiffinfo programs are:
Copyright (c) 1988, 1989, 1990, 1991, 1992 Sam Leffler
Copyright (c) 1991, 1992 Silicon Graphics, Inc.
macOS September 2, 2010 macOS