unix script to takes the old data from a TXT file and compress them into new file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting unix script to takes the old data from a TXT file and compress them into new file
# 1  
Old 02-20-2008
unix script to takes the old data from a TXT file and compress them into new file

Hi,
I am looking for the unix script which can takes the 2 month old data from a TXT file (there is one txt file in whiche messages are appended on daily basis) and compress them into new file.Please halp me out.
# 2  
Old 02-20-2008
Question easier if can see some sample lines of the file

but, in theory...
just split the file in two based on some critera

criteria will be effected by such things as:
(a) should it be run just monthly, or daily
(b) is the log file always open
--> this can cause some complications in the removal process
(c) is the posting date part of the record structure
# 3  
Old 03-05-2008
Please find the answeres :
(a) monthly basis
(b) is the log file always open :NO
(c) is the posting date part of the record structure :yes


Thanks
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to get the shell script to read the .txt file as an input/data?

i have written my shell script in notepad however i am struggling to pass the data file to be read to the script the data file is of .txt format. My target is to run the shell script from the terminal and pass 3 arguments e.g. polg@DESKTOP-BVPDC5C:~/CS1420/coursework$ bash valsplit.sh input.txt... (11 Replies)
Discussion started by: Gurdza32
11 Replies

2. Programming

Writing a UNIX shell script to call a C function and redirecting data to a .txt file

Hi, I am complete new to C programming and shell scripting. I just wrote a simple C code to calculate integral using trapezoid rule. I am prompting user to pass me No. of equally spaced points , N , upper and lower limit. My code looks as follows so far: #include<stdio.h> #include<string.h>... (2 Replies)
Discussion started by: bjhjh
2 Replies

3. Shell Programming and Scripting

create txt file form data file

File A.txt LL07 LL07_B_1 20 LL85 LL85_A_1 40 LL85 LL85_B_1 40 LL85 LL85_C_1 30 LL37 LL37_A_1 60 LL37 LL37_B_1 20 LL37 LL37_C_1 50 I want cretae diffrent tex file base of above file Should be threee text file LL07.txt LL85.txt LL37.txt Eaach text file have below data... (2 Replies)
Discussion started by: asavaliya
2 Replies

4. Shell Programming and Scripting

create txt file form data file and add some line on it

Hi Guys, I have file A.txt File A Data AK1521 AK2536 AK3164 I want create text file of all data above and write some data on each file. want Output on below folder /home/kka/out AK1521.txt Hi Welocme (3 Replies)
Discussion started by: asavaliya
3 Replies

5. Shell Programming and Scripting

Get Data From CSV File and put into a txt file

Hi Guys, File A I have File A as CSV Format.... No R SS MK Par value S AL A1 PKL123 Lo12 1 S AL A2 PKl123 Lo34 22 S AL A3 PkLK234 Lo67 -34 S AL A4 PkLK235 Lo09 120 S AL A5 PkLK236 Lo76 19 S AL A6 PkLK237 Lo44 -17 S AL A7 PkLK238 Lo90 2 S AL A8 PkLK239 Lo34 -9 I want file B like... (4 Replies)
Discussion started by: asavaliya
4 Replies

6. Shell Programming and Scripting

compress the data and append into a text file

Following is the code: ------------------------------ a=100 b=200 c=300 touch testfl.txt.gz chmod 664 testfl.txt.gz echo $a|gzip >> "testfl.txt.gz" echo $b|gzip >> "testfl.txt.gz" echo $c|gzip >> "testfl.txt.gz" ------------------------------ There is a requirement as follows. I need... (1 Reply)
Discussion started by: kmanivan82
1 Replies

7. UNIX for Dummies Questions & Answers

How to Update DB table from txt file using CRONJOB in Unix Shell Script

Hi Experts, can guide how we can Update a Database Table using a txt file source Using Unix Shell Scripts. What are the Cron Jobs codes can written to Update DB table. txt file contains record like data. US 09/03/2012 User DocType DocID. these above feilds in txt files need to be updated in... (4 Replies)
Discussion started by: mahesh.sap
4 Replies

8. Shell Programming and Scripting

Want to read data from a file name.txt and search it in another file and then matching...

Hi Frnds... I have an input file name.txt and another file named as source.. name.txt is having only one column and source is having around 25 columns...i need to read from name.txt line by line and search it in source file and then save the result in results file.. I have a rough idea about the... (15 Replies)
Discussion started by: ektubbe
15 Replies

9. UNIX for Dummies Questions & Answers

Issue: Compress in unix server and FTP to windows and open the compress file using Winzip

Hi All ! We have to compress a big data file in unix server and transfer it to windows and uncompress it using winzip in windows. I have used the utility ZIP like the below. zip -e <newfilename> df2_test_extract.dat but when I compress files greater than 4 gb using zip utility, it... (4 Replies)
Discussion started by: sakthifire
4 Replies

10. UNIX for Dummies Questions & Answers

compress a file in unix

Hi, I want to compress a dmp file and ftp to another machine.pls tell me the steps to compress and uncompress the file in unix Thankyou (5 Replies)
Discussion started by: rujupriya
5 Replies
Login or Register to Ask a Question