xbin is right and basically the command he gave should be sufficient.
There might be several problems, though:
1. Does order matter (like vbe mentioned)?
2. Are the files well-formed? Some have missing end-of-line markers or end-of-file markers and concatenating them might produce this:
file 1:
file 2:
after concatenation:
file 1:
3. How many files are there involved? If you issue a wildcard which expands to a really, really big number of files (several thousands) you might get over the maximum line length of the shell (because the wildcard is expanded to a list of filenames) and the command might fail for this reason. This is a remote chance, but it is there.
I am writing a script that is running a loop on one file to obtain records from another file.
Using egrep, I am finding matching records in file b, then outputing feilds of both into another file.
****************************
filea=this.txt
fileb=that.txt
cat $filea | while read line
do... (1 Reply)
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)
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)
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)
Hi,
Here is what i'm trying to do,
-Check in two directories for a user inputed filename
-Then cat all the version found of the file to the current screen
I am a total nembie to programming, here what i have done so far....
#!/bin/bash
#Check in /home/loonatic and /var/named/master... (2 Replies)
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)
Bros,
I have list of files
20140916_registeredshop.csv
20140916_datavisit.csv
20140915_registeredshop.csv
20140915_datavisit.csv
20140914_registeredshop.csv
20140914_datavisit.csv
20140913_registeredshop.csv
20140913_datavisit.csv
20140912_registeredshop.csv
20140912_datavisit.csv
... (1 Reply)
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)
I have a directory that is restricted and I cannot just copy the files need, but I can cat them and redirect them to a new directory. The files all have the date listed in them. If I perform a long listing and grep for the date (150620) I can redirect that output to a text file. Now I need to... (5 Replies)
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 OPENSOLARIS
rdjpgcom
rdjpgcom(1) User Commands rdjpgcom(1)NAME
rdjpgcom - display text comments from a JPEG file
SYNOPSIS
rdjpgcom [-verbose] [filename]
DESCRIPTION
rdjpgcom reads the named JPEG or JFIF file, or the standard input if no file is named, and displays any text comments found in the file on
the standard output.
The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. Although the standard does not actually define the intended
function of COM blocks, they are widely used to hold user-supplied text strings. This enables you to add annotations, titles, index terms,
and so on to your JPEG files, and later retrieve the COM blocks as text. COM blocks do not interfere with the image stored in the JPEG
file. The maximum size of a COM block is 64K, but you can have many COM blocks in one JPEG file.
OPTIONS
The following options are supported:
-verbose Causes rdjpgcom to also display the JPEG image dimensions.
OPERANDS
The following operands are supported:
filename The name of the JPEG file that contains text comments.
EXTENDED DESCRIPTION
rdjpgcom does not depend on the IJG JPEG library. The rdjpgcom source code is intended to illustrate the minimum amount of code required to
parse a JPEG file header correctly.
In -verbose mode, rdjpgcom also attempts to display the contents of any "APP12" markers as text. Some digital cameras produce APP12 markers
that contain useful textual information. You can also modify the source code to display other APPn marker types.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWjpg |
+-----------------------------+-----------------------------+
|Interface stability |Volatile |
+-----------------------------+-----------------------------+
SEE ALSO cjpeg(1), djpeg(1), jpegtran(1), wrjpgcom(1)NOTES
This man page was originally written by the Independent JPEG Group. Updated by Breda McColgan, Sun Microsystems Inc., 2004.
SunOS 5.11 26 Mar 2004 rdjpgcom(1)