Sponsored Content
Top Forums Shell Programming and Scripting Read the apecific data from one file and write into another file Post 302439244 by dennis.jacob on Thursday 22nd of July 2010 06:44:04 AM
Old 07-22-2010
Try:

Code:
awk '/DETY/ { s=""; s=$1" "$2; } /SP=/ {s=s" "$3; } /MGG=/ { s=s" "$1; } /END/ { print s; }' file

This User Gave Thanks to dennis.jacob For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

read and write from a file

I have tried to show the file name whose size is greater than 200 byte in current directory. Please help me. ls -l | tr -s " " " " | cut -f 5,9 -d " " >out.txt #set -a x `cat out.txt` i=0 `cat out.txt` | while do read x echo $x #re=200 j=0 if }" < "200" ] then echo $j j=`expr $j... (2 Replies)
Discussion started by: rinku
2 Replies

2. Programming

Read/Write a fairly large amount of data to a file as fast as possible

Hi, I'm trying to figure out the best solution to the following problem, and I'm not yet that much experienced like you. :-) Basically I have to read a fairly large file, composed of "messages" , in order to display all of them through an user interface (made with QT). The messages that... (3 Replies)
Discussion started by: emitrax
3 Replies

3. Shell Programming and Scripting

Read Write byte range/chunk of data from specific location in file

I am new to Unix so will really appreciate if someone can guide me on this. What I want to do is: Step1: Read binary file - pick first 2 bytes, convert from hex to decimal. Read the next 3 bytes as well. 2 bytes will specify the number of bytes 'n' that I want to read and write... (1 Reply)
Discussion started by: Kbenipel
1 Replies

4. Shell Programming and Scripting

Extract data from an XML file & write into a CSV file

Hi All, I am having an XML tag like: <detail sim_ser_no_1="898407109001000090" imsi_1="452070001000090"> <security>ADM1=????</security> <security>PIN1=????</security> <security>PIN2=????</security> ... (2 Replies)
Discussion started by: ss_ss
2 Replies

5. Shell Programming and Scripting

Unfold the data from a input file and write to a file

I am working on a script to unfold data for each column from a specific line of data and write output in a single line. Input data looks like this. 2011-09-26 INF UM_10 UserMana Starting synchronization for security domain 14:37:31 080 gementSe . rvice I... (2 Replies)
Discussion started by: svajhala
2 Replies

6. Shell Programming and Scripting

how read specific line in a file and write it in a new text file?

I have list of files in a directory 'dir'. Each file is of type HTML. I need to read each file and get the string which starts with 'http' and write them in a new text file. How can i do this shell scripting? file1.html <head> <url>http://www.google.com</url> </head> file2.html <head>... (6 Replies)
Discussion started by: vel4ever
6 Replies

7. Shell Programming and Scripting

Read user input, Encrypt the data and write to file

Hi, can some one help me how to encrypt and decrypt a file. AIM: reade user input, encrypt it and save it to file. while decryption read the encrypted file decrypt it and save the output in some variable. Example: consider we have Credentials.txt file with content username: password... (5 Replies)
Discussion started by: saichand1985
5 Replies

8. Shell Programming and Scripting

Read a file and write to new file with some condition

Hi.... I have a data file, which I want to split and write to new file...it looks like this... Column1 column2 Column 3 1 28.25 36.42 -----Read 5 28.26 36.42 10 28.23 36.43 15 28.22 36.43... (1 Reply)
Discussion started by: nex_asp
1 Replies

9. Shell Programming and Scripting

Extract data from XML file and write in CSV file

Hi friend i have input as following XML file <?xml version="1.0"?> <Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.054.001.02"> <BkToCstmrDbtCdtNtfctn> <GrpHdr><MsgId>LBP-RDJ-TE000000-130042430010001001</MsgId><CreDtTm>2013-01-04T03:21:30</CreDtTm></GrpHdr>... (3 Replies)
Discussion started by: mohan sharma
3 Replies

10. Shell Programming and Scripting

Compare 2 text file with 1 column in each file and write mismatch data to 3rd file

Hi, I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file. File1 - file2 = file3 wc -l file1.txt 58112 wc -l file2.txt 55260 head -5 file1.txt 101214200123 101214700300 101250030067 101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 Replies
write_reading(3)						  Staden Package						  write_reading(3)

NAME
write_reading, fwrite_reading - Write a Read structure into a trace file. SYNOPSIS
#include <Read.h> int write_reading( char *filename, Read *read, int format); int fwrite_reading( FILE *fp, Read *read, int format); DESCRIPTION
These functions write a Read structure into a trace file. The principle format support is the SCF format. Although reading is supported for ABI and ALF, writing is not. Additionally, it is possible to write using the plain (old) staden format files or as Experiment files. In both these cases only the sequence component of the trace file will be written. When writing as an experiment file the QL, QR and SQ fields are generated from the Read structure. If we previously created the Read struc- ture from reading an experiment file then the original experiment file data is also written. Otherwise EN, ID, LN and LT lines are also generated. write_reading() writes a Read structure to the specified filename in the specified format. Formats available are TT_SCF, TT_PLNand TT_EXP. Specifying format TT_ANY will be treated as TT_SCF. fwrite_reading() writes a Read structure to the specified FILE pointer in the specified format. Apart from writing to FILE pointer instead of a filename, the function is identical to write_reading(). RETURN VALUES
On successful completion, the write_reading() and fwrite_reading() functions return 0. Otherwise these functions return -1. SEE ALSO
read_reading(3), fread_reading(3), deallocate_reading(3), scf(4), ExperimentFile(4) write_reading(3)
All times are GMT -4. The time now is 03:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy