11-27-2006
KSH CAT Two files into one
Quick question,
File A has one line (10 charachters), File B has one line (10 charachters).
how do a concat these two files together to produce a file (File C) that has the contents of Files A + B together onto one line of 20 Charachters
if I use:
cat FileA FileB > FileC
I get the following in FileC:
AAAAAAAAAA
BBBBBBBBBBB
When I need it on one line, i.e.
AAAAAAAAAABBBBBBBBBBB
Thanks.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I need to write a shell script that should lists only the files that starts with alphabet from the /proc dir and then I have to cat those files and redirect to a file.
But my below script is not working. It is reading the first file properly but not the subsequent files. Please throw a... (2 Replies)
Discussion started by: royalibrahim
2 Replies
2. UNIX for Dummies Questions & Answers
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. Shell Programming and Scripting
i have data files in different directories like /jadat
/cadat etcc... i have list of this directories in a file files.
content of files:
ja
ca
directories:
/jadat
/cadat
file in each of these directories
natt_trans_like.dat
i need to loop though each directory for a... (1 Reply)
Discussion started by: dsravan
1 Replies
4. 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
5. Shell Programming and Scripting
Just want to ask if the below code is correct;
if ; then
echo "No log found from " $data
exit 0
else
cat out.txt
fi
this is to test if the content of out.txt is 0 then message appear that there is no log. Is this correct? (3 Replies)
Discussion started by: harry0013
3 Replies
6. HP-UX
what are cpio.cat.z files??? Can I delete them??? (3 Replies)
Discussion started by: ldaliosmane
3 Replies
7. 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
8. UNIX for Dummies Questions & Answers
I am concatenating txt-files using cat:
cat *.txt > file.dat
However, the same directory has the installation instructions included, which is also a txt file: install.txt
I currently have the install.txt file renamed to install._txt, but I prefer a solution using regular expressions.
Is there... (5 Replies)
Discussion started by: figaro
5 Replies
9. Shell Programming and Scripting
I am trying to cat 3 files. They all have the same name MFExtract.txt. But, they are in 3 seperate file names. Any idea how I could cat the 3 together. It's throwing me off figuring out a way because the names are the same. I was thinking just doing a 3 cat commands with the full path names and... (2 Replies)
Discussion started by: risarose87
2 Replies
10. Shell Programming and Scripting
I am new to Linux and I am trying to cat only N files in a folder. N is dynamically given number at runtime.
If I give N as 2 then cat only 2 files in the folder
and If I give N as 5 then cat only 5 files in the folder.
Is there any way to do that? (6 Replies)
Discussion started by: KMusunuru
6 Replies