04-03-2008
Using cat to combine files using wildcards
How do I use cat (presumably with a sh script) to combine all the files in a directory without listing them individually.
Thank you for your patience with this very elementary question.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi all,
Would like to rename all files using wildcards - if at all possible!
As an example I have the following files:
Nov01_df
Nov02_df
Nov03_df
......
Nov28_df
Nov29_df
Nov30_df
I'd like to have these renamed as "df??" where ?? is the number from the original file name.
Any... (5 Replies)
Discussion started by: Cameron
5 Replies
2. 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
3. Shell Programming and Scripting
Hi All
I am having hundred over file in the below pattern.
AA050101.INI
BB090101.INI
.
.
ZX980101.INI
Need to rename these files with an extension .bak
AA050101.INI.bak
BB090101.INI.bak
.
.
ZX980101.INI.bak (5 Replies)
Discussion started by: karthikn7974
5 Replies
4. 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
5. Shell Programming and Scripting
I have a question regarding Perl scripting.
If I want to say open files that all look like this and assign them to a filehandle and then assign the filehandle to a variable, how do I do this?
The file names are
strand1.fa.gz.tmp
strand2.fa.gz.tmp
strand3.fa.gz.tmp
strand4.fa.gz.tmp
...... (6 Replies)
Discussion started by: japaneseguitars
6 Replies
6. Shell Programming and Scripting
I have multiple files; each file contains a certain data in a column view
simply i want to combine all those files into one file in columns
example
file1:
a
b
c
d
file 2:
1
2
3
4
file 3:
G (4 Replies)
Discussion started by: ahmedamro
4 Replies
7. UNIX for Dummies Questions & Answers
Hello, I am attempting to copy a series of files using a wildcard into a new subdirectory. however, I am clearly doing something wrong as it is not working. I want to copy all files in the directory that start with the letters kl but have other letters after this initial two letters into another... (7 Replies)
Discussion started by: goldenone
7 Replies
8. Shell Programming and Scripting
Hi,
i have two files. i want to combine records from these two files in below manner :-
first line from first file(1st line)
2nd line from 2nd file(1st line)
3rd line from 1st file(2nd line)
4th line from 2nd file(2nd line)
so on.... (1 Reply)
Discussion started by: deepakiniimt
1 Replies
9. Shell Programming and Scripting
I have n of files with ending with _ZERO.txt
need to combine all file ending with _ZERO.txt into 1 file
ex:
A_ZERO.txt
1
2
B_ZERO.txt
3
4
Output:
FINAL.txt
1
2 (3 Replies)
Discussion started by: satish1222
3 Replies
10. UNIX for Beginners Questions & Answers
i use the split command to split a one terabyte backup file into 10 chunks of 100 GB each. The files are split one after the other. While the files is being split, I will like to scp the files one after the other as soon as the previous one completes, from server A to Server B. Then on server B ,... (2 Replies)
Discussion started by: malaika
2 Replies
LEARN ABOUT DEBIAN
flow-cat
flow-cat(1) General Commands Manual flow-cat(1)
NAME
flow-cat -- Concatenate flow files
SYNOPSIS
flow-cat [-aghmp] [-b big|little] [-C comment] [-d debug_level] [-o filename] [-t start_time] [-T start_time] [-z z_level]
[file|directory ...]
DESCRIPTION
The flow-cat utility processes files and/or directories of files in the flow-tools format. The resulting concatenated data set is written
to the standard output or file specified by -o. If file is a single dash (`-') or absent, flow-cat will read from the standard input.
OPTIONS
-a Do not ignore filenames that begin with tmp.
-b big|little
Byte order of output.
-C Comment
Add a comment.
-d debug_level
Enable debugging.
-g Sort file list by capture start time before processing.
-h Display help.
-m Disable the use of mmap().
-p Preload headers. Use to preserve meta information such as lost flows.
-o file Write to file instead of the standard out.
-t start_time
Select flow files up to start_time. If used with -T select files between start_time and end_time.
-T end_time
Select flow files after end_time. If used with -t select files between start_time and end_time.
-z z_level
Configure compression level to z_level. 0 is disabled (no compression), 9 is highest compression.
file|directory...
Process the files and/or directory.
TIME
/DATE parsing
start_time and end_time parsing is implemented with getdate.y, a commonly used function to process free-form time date specifications.
Example usage borrowed from cvs:
1 month ago
2 hours ago
400000 seconds ago
last year
last Monday
yesterday
a fortnight ago
3/31/92 10:00:07 PST
January 23, 1987 10:05pm
22:00 GMT
EXAMPLES
Concatenate all flow files begining with ft-v05.2001-05.01, use flow-print to display the results.
flow-cat ft-v05.2001-05-01.* | flow-print
Concatenate flow files in /flows/krc4, store store the output in compressed.flows at compression level 9 (best). The headers are preloaded
so various metadata such as the flow count is correct in the result. Filenames begining with tmp which are typically in-progress flow
files from flow-capture are not processed.
flow-cat -p -z9 /flows/krc4 > compressed.flows
BUGS
None known.
AUTHOR
Mark Fullmer maf@splintered.net
SEE ALSO
flow-tools(1)
flow-cat(1)