10-27-2006
append file name contents to a target file
Hi ,
I want to append the contents of many files (not knowing exactly how many files, i will get) in to one target file on a day today basis.
The file names are similar except last value (which is sequence number)
eg) file1_20061026_1
file1_20061026_2 etc.,
How can i read all the files one by one and append it to the target file.
I am very new to unix and it would be great if i get help from Unix Gurus.
Thanks in advance,
gops
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi
is there any way to append the file contents at server1 to another file in server2 by using scp.
right now am transferring files to the server2 and using cat command for appending... (2 Replies)
Discussion started by: aemunathan
2 Replies
2. UNIX for Dummies Questions & Answers
Give shell script....which takes two file names as input and compares the contents, is both are same delete second file's contents.....
I try with "diff"...... but confusion how to use "diff" with if ---else
Thanking you (5 Replies)
Discussion started by: krishnampkkm
5 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I want to write a script that will write a couple of lines into a file, including the output of another file... Can anyone help?
Scenario
Day 1
File 1 Contents -->
Japan
File 2 contents (to be wriiten by the script) -->
Name: Sameer
Country: Japan
Day 1
File 1... (0 Replies)
Discussion started by: carlos_anubis
0 Replies
4. UNIX for Dummies Questions & Answers
Hello every body,
Kindly support me to "copy a file without remove the contents of the target file"
Thanks in advance. :)
Ahmed Amer
Cairo,Egypt (2 Replies)
Discussion started by: ahmedamer12
2 Replies
5. Shell Programming and Scripting
Hi,
I want to delete the contents of a file which are matching with contents of other file in shell scripting.
Ex.
file1
sheel,sumit,1,2,3,4,5,6,7,8
sumit,rana,2,3,4,5,6,7,8,9
grade,pass,2,3,4,5,6,232,1,1
name,sur,33,1,4,12,3,5,6,8
sheel,pass,2,3,4,5,6,232,1,1
File2... (3 Replies)
Discussion started by: ranasheel2000
3 Replies
6. Shell Programming and Scripting
Hi,
I am facing issue while reading data from a file in UNIX. my requirement is to compare two files and for the text pattern matching in the 1st file, replace the contents in second file by the contents of first file from start to the end and write the contents to thrid file.
i am able to... (2 Replies)
Discussion started by: seeki
2 Replies
7. Shell Programming and Scripting
Hello,
I have a special problem. I have a file in 8 bit and would like to convert the whole database to 16Bit unicode.
The mapping file has the following structure:
The mapper is provided as a zip file
The target file to be converted contains data in English and 8 bit Urdu mapping, a... (4 Replies)
Discussion started by: gimley
4 Replies
8. Shell Programming and Scripting
Hi one of the output of the command is as below
# sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/'
Resource List : <br>
*************************** 1. row ***************************<br>
... (2 Replies)
Discussion started by: vivek d r
2 Replies
9. Shell Programming and Scripting
Hello there,
I have a files f1.html, f2.html.
I have a final file called final.html which is something like the below snippet
<!DOCTYPE html>
<html>
<body>
<h1 align="center">aaaaa Report</h1>
<pppp><p><b>pppp Repository</b></p>
</pppp>
<qqqq><p><b>qqqq Repository </b></p>... (4 Replies)
Discussion started by: H squared
4 Replies
10. Shell Programming and Scripting
Shell script logic
Hi
I have 2 input files like with file 1 content as (file1)
"BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt
File 2 contents as fle(2)
"BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt
I want to get... (22 Replies)
Discussion started by: pottic
22 Replies