Sponsored Content
Top Forums Shell Programming and Scripting Using cat to combine files using wildcards Post 302181537 by Enobarbus37 on Thursday 3rd of April 2008 09:08:00 AM
Old 04-03-2008
A complicating feature

Thank you for your replies!

Unfortunately, here is a partial list of my file names:

1 INSERM Avenir, Epidemiology of Sudden Death in the Population, Paris XI University.rtf

24% mortality in the ICD group, 55% in the pharmacological therapy group, and 48% in the group receiving no therapy.rtf

A frequently observed and notable aspect of SCD is its unpredictable and seemingly random nature of onset. Accordingly, one of.rtf

A multicenter experience with novel subcutaneous patch.rtf

A subcutaneous ICD system is a very useful new treatment approach. This technique is especially suitable for young children and.rtf


As you can see, they contain spaces, punctuation marks, and pretty much every other forbidden thing Unix can imagine.

What happens when I do "cat dirname/* > newfile" is that I just get the first file.

When I try the script: "for file in *; do cat $file >> newfile; done", it does not like the file names.

Sorry for the horrible complication...
Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Move files using wildcards ???

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

Difference between cat , cat > , cat >> and touch !!!

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

rename multiple files with wildcards

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

cat certain files in directories to files named after the dir?

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

Perl, open multiple files with wildcards

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

combine multiple files by column into one files already sorted!

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

copying files with wildcards

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

combine two files...

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

Combine files

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

Automate splitting of files , scp files as each split completes and combine files on target server

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
DOXYGEN(1)							   User Commands							DOXYGEN(1)

NAME
doxygen - documentation system for various programming languages DESCRIPTION
Doxygen is a documentation system for C++, C, Java, Objective-C, IDL (Corba and Microsoft flavors) and to some extent PHP, C#, and D. You can use doxygen in a number of ways: 1) Use doxygen to generate a template configuration file: doxygen [-s] -g [configName] If - is used for configName doxygen will write to standard output. 2) Use doxygen to update an old configuration file: doxygen [-s] -u [configName] 3) Use doxygen to generate documentation using an existing configuration file: doxygen [configName] If - is used for configName doxygen will read from standard input. 4) Use doxygen to generate a template file controlling the layout of the generated documentation: doxygen -l layoutFileName.xml 5) Use doxygen to generate a template style sheet file for RTF, HTML or Latex. RTF: doxygen -w rtf styleSheetFile HTML: doxygen -w html headerFile footerFile styleSheetFile [configFile] LaTeX: doxygen -w latex headerFile footerFile styleSheetFile [configFile] 6) Use doxygen to generate an rtf extensions file RTF: doxygen -e rtf extensionsFile If -s is specified the comments in the config file will be omitted. If configName is omitted `Doxyfile' will be used as a default. AUTHOR
Doxygen version 1.8.5, Copyright Dimitri van Heesch 1997-2013 SEE ALSO
doxywizard(1). doxygen 1.8.5 June 2014 DOXYGEN(1)
All times are GMT -4. The time now is 11:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy