Sponsored Content
Full Discussion: cat multiple files questions
Top Forums UNIX for Dummies Questions & Answers cat multiple files questions Post 302362067 by pludi on Thursday 15th of October 2009 01:54:40 AM
Old 10-15-2009
You can use double-quotes to tell the shell not to split arguments on whitespaces, but still substitute globs and variables, eg:
Code:
cat "my file.*" > 'my file'

As for verbosity, cat isn't really that telling. You could put another command at the end to tell you that it's done, or you'll have to use some coding:
Code:
[ -f 'my file' ] && rm 'my file'
for file in "my file.*"
do
    echo "Appending ${file}"
    cat "$file" >> 'my file'
done

This User Gave Thanks to pludi For This Post:
 

10 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

*BSD slices - multiple questions

Can you have a second primary slice on a second hdd? I know that primary slices are defined in the mbr, but where are all the sub partitions defined at? From the OBSD installation FAQ: What exactly is in the PBR? (0 Replies)
Discussion started by: Derrek
0 Replies

2. UNIX for Dummies Questions & Answers

cat files

Hi, I was a typical Windows guy. Like to do things just by clicking my mouse:cool:. I got a new job now...where they are big on unix. I am trying to wet my fingures now with unix. Haven't taken the dive yet. I am trying to find a solution for this problem. Please help me with some... (4 Replies)
Discussion started by: sandeep78
4 Replies

3. 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

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

bash: cat multiple files together except first line?

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

6. UNIX Desktop Questions & Answers

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 (1 Reply)
Discussion started by: balwit
1 Replies

7. UNIX for Dummies Questions & Answers

CAT multiple files according to file name

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. Shell Programming and Scripting

Select answers from multiple questions using shell script

I have a text file in this format Some lines.... Question no: 1 The question? A. Answer 1 B. Answer 2 C. Answer 3 D. Answer 4 Answer:B Some lines.... Question no: 2 The question? (choose 2) (10 Replies)
Discussion started by: zorrox
10 Replies

9. UNIX for Dummies Questions & Answers

Is there any way to cat multiple files and show filenames?

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

10. UNIX for Beginners Questions & Answers

Merge multiple columns into one using cat

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

NAME
gnomevfs-cat - print a file to standard output using the VFS system SYNOPSIS
gnomevfs-cat URI DESCRIPTION
gnomevfs-cat prints a file to standard output using the virtual file system to access the file via a URI. OPERANDS
The following operands are supported: URI Specifies the file location in standard URI format. EXAMPLES
Example 1: Cat a File From a Web Server example% gnomevfs-cat http://www.sun.com Example 2: Cat a Local File example% gnomevfs-cat file:///home/user/README.txt ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables: NLSPATH. EXIT STATUS
The exit value 0 is returned regardless of success or failure. FILES
The following files are used by this application: /usr/bin/gnomevfs-cat Executable to print a file to standard output using the VFS system ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-vfs | +-----------------------------+-----------------------------+ |Interface stability |External | +-----------------------------+-----------------------------+ SEE ALSO
gnomevfs-copy(1), gnomevfs-info(1), gnomevfs-ls(1), gnomevfs-mkdir(1) NOTES
Written by Stephen Browne, Sun Microsystems Inc., 2004. SunOS 5.10 6 Sep 2004 gnomevfs-cat(1)
All times are GMT -4. The time now is 03:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy