02-11-2012
trying to cat multiple pairs of files
I have a number of files in a directory named like this:
fooP1, fooN1, fooP2, fooN2 ... fooP(i), fooN(i).
I'd like to know how to combine each P and N pair into a single file, foo(i)
TIA
John Balwit
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi
Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX?
Thanks (6 Replies)
Discussion started by: skyineyes
6 Replies
2. UNIX for Dummies Questions & Answers
Hi--
I'm trying to figure out how to use cat more wisely. I have the following command, which works, but I'd like to understand how to get it to work more clearly and efficiently.
cat 'my file.001' 'my file.002' 'my file.003' 'my file.004' 'my file.005' 'my file.006' 'my file.007' 'my... (6 Replies)
Discussion started by: rlinsurf
6 Replies
3. Shell Programming and Scripting
Hi all,
I have a directory with many subdirectories each named like so: KOG0001, KOG0002, ...KOG9999.
Each of these subdirectories contain a variable number two kinds of files (nuc and prot) named like so: Capitella_sp_nuc_hits.fasta (nuc) and Capitella_sp_prot_hits.fasta (prot). The... (2 Replies)
Discussion started by: kmkocot
2 Replies
4. Shell Programming and Scripting
Hopefully the title summarized what I need help with. I have multiple files that I would like to concatenate in bash.
ie:
cat file1 file2 file3 > bigfile
except I do not want to include the first line from each file (). Any help? Thanks. (6 Replies)
Discussion started by: sanimfj
6 Replies
5. Shell Programming and Scripting
Hi all,
please help me construct the command. i want to loop through all files named bam* and bed*. My awk works for a particular pair but there are too many pairs to do manually.
I have generated multiple files in a folder in a given pattern. The files are named like
bam_fixed1.bam... (2 Replies)
Discussion started by: newbie83
2 Replies
6. Shell Programming and Scripting
Hi all,
Please guide. It has to do with parsing the input file names.
I have a fairly large number of files, I want to do some operations on them in a pairwise fashion (every file has a pair).
The names are in the following pattern, with the pairs of files named with _1 and _2 , the... (4 Replies)
Discussion started by: newbie83
4 Replies
7. UNIX for Dummies Questions & Answers
I have a folder that contains a number of files with file names as follows:
XX.YYYY..ZZZ.2014.001.000000
XX.YYYY..ZZZ.2014.001.000400
XX.YYYY..ZZZ.2014.001.000800
XX.YYYY..ZZZ.2014.001.001200
XX.YYYY..ZZZ.2014.001.001600
.....
XX.YYYY..ZZZ.2014.002.000000
XX.YYYY..ZZZ.2014.002.000400... (8 Replies)
Discussion started by: quakesrus
8 Replies
8. UNIX for Dummies Questions & Answers
Hi,
Is there any way to do a cat * where it shows the name of each file in the process? Similar to what more does below?
$ more ?.sql
::::::::::::::
1.sql
::::::::::::::
set linesize 200
select db_unique_name,
cast(
from_tz(
cast(... (5 Replies)
Discussion started by: newbie_01
5 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I would like to batch concatenate files by pairs. I have quite a few of them so I would not like to do that pair by pair separately.
the names of the file is of the type:
file1.fastq
newfile1_new.fastq
file2.fastq
newfile2_new.fastq
and so on...
I would like to concatenate file1... (2 Replies)
Discussion started by: jawad
2 Replies
10. UNIX for Beginners Questions & Answers
I will like to merge several files using 'cat', but I observe the output is not consistent. the merge begins at the last line of the first file.
file1.txt:
1234
1234
1234
file2.txt:
aaaa
bbbb
cccc
dddd
cat file1.txt file2.txt > file3.txt
file3.txt:
1234
1234
1234aaaa
bbbb
cccc... (13 Replies)
Discussion started by: geomarine
13 Replies
LEARN ABOUT LINUX
dh_link
DH_LINK(1) Debhelper DH_LINK(1)
NAME
dh_link - create symlinks in package build directories
SYNOPSIS
dh_link [debhelperoptions] [-A] [-Xitem] [sourcedestination...]
DESCRIPTION
dh_link is a debhelper program that creates symlinks in package build directories.
dh_link accepts a list of pairs of source and destination files. The source files are the already existing files that will be symlinked
from. The destination files are the symlinks that will be created. There must be an equal number of source and destination files specified.
Be sure you do specify the full filename to both the source and destination files (unlike you would do if you were using something like
ln(1)).
dh_link will generate symlinks that comply with Debian policy - absolute when policy says they should be absolute, and relative links with
as short a path as possible. It will also create any subdirectories it needs to to put the symlinks in.
dh_link also scans the package build tree for existing symlinks which do not conform to Debian policy, and corrects them (v4 or later).
FILES
debian/package.links
Lists pairs of source and destination files to be symlinked. Each pair should be put on its own line, with the source and destination
separated by whitespace.
OPTIONS
-A, --all
Create any links specified by command line parameters in ALL packages acted on, not just the first.
-Xitem, --exclude=item
Do not correct symlinks that contain item anywhere in their filename from being corrected to comply with Debian policy.
source destination ...
Create a file named destination as a link to a file named source. Do this in the package build directory of the first package acted on.
(Or in all packages if -A is specified.)
EXAMPLES
dh_link usr/share/man/man1/foo.1 usr/share/man/man1/bar.1
Make bar.1 be a symlink to foo.1
dh_link var/lib/foo usr/lib/foo
usr/share/man/man1/foo.1 usr/share/man/man1/bar.1
Make /usr/lib/foo/ be a link to /var/lib/foo/, and bar.1 be a symlink to the foo.1
SEE ALSO
debhelper(7)
This program is a part of debhelper.
AUTHOR
Joey Hess <joeyh@debian.org>
8.9.0ubuntu2.1 2012-06-12 DH_LINK(1)