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
SGML2RTF(1)						      General Commands Manual						       SGML2RTF(1)

NAME
sgml2rtf - create RTF output from a LinuxDoc DTD SGML source file SYNOPSIS
sgml2rtf [generic_option...] [--twosplit] file[.sgml] DESCRIPTION
sgml2rtf is an old and obsoleted form of the rtf converter command of LinuxDoc-Tools. It is recommended to switch the new form linuxdoc -B rtf now. It converts a LinuxDoc DTD SGML source file to RTF, the Rich Text Tormat used by the Microsoft Windows help system. Output will appear in the top level file file.rtf and file-n.rtf for each section, where file is the name of the SGML source file. The RTF output is tailored for compilation by the Windows Help Compiler (hc31.exe). The attribute/value pair "output=rtf" is set for conditionals. OPTIONS
sgml2rtf accepts all the generic options described in linuxdoc(1),and: --twosplit, -2 Splits files both at n. sections and n.m. subsections file The SGML source file, named either file or file.sgml FILES
Many files and executables in /usr/share/linuxdoc-tools and /usr/bin are used. BUGS
None known. AUTHOR
Originally written by Steve Tynor <tynor@atlanta.twr.com>, and Cees de Groot <cg@pobox.com> for sgml-tools (v1). Currently maintained by Taketoshi Sano <sano@debian.org> for Linuxdoc-Tools. SEE ALSO
linuxdoc(1), sgml2html(1), sgml2info(1), sgml2latex(1), sgml2lyx(1), sgml2txt(1), sgmlcheck(1). 16 May 2000 SGML2RTF(1)
All times are GMT -4. The time now is 08:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy