Sponsored Content
Top Forums Shell Programming and Scripting Removing inline binary data from txt file Post 302789937 by tasmac on Thursday 4th of April 2013 12:35:38 PM
Old 04-04-2013
nope
Code:
sandbox]$>nawk '{gsub(/[[:cntrl:]]/,x)}1' bin4lines.txt
app_id:1936 pgm_num:0 branch:TBNY ord_num:0500012(QMK) deal_num:0 ref_num:R
app_id:1396 pgm_num:0 branch:TBNY ord_num:0000016(Ì11S) deal_num:0 ref_num:R
app_id:1996 pgm_num:0 branch:TBNY ord_num:0260012(ûPAK) deal_num:0 ref_num:R
app_id:1936 pgm_num:0 branch:TBNY ord_num:F016 deal_number:0 ref_num:R
Q6I) deal_number:0 m:0 branch:NY ord_num:0440000010(
/sandbox]$>

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Binary data to text file conversion

Dear Sir; i want to know how the binary data convert to text file or readablw format (ASCII).If possible pl. help me for the software and where it is available for download. i.e. (1 Reply)
Discussion started by: auro123
1 Replies

2. UNIX for Advanced & Expert Users

get data from .txt file

Hi I have a file diskspace.txt the data in that file is asFilesystem kbytes used avail %used Mounted on /dev/vg06/lvol1 18870272 12099836 6673336 64% /dist know i am writing a script to get the above bold data and that data need to be used as a input. any idea... (4 Replies)
Discussion started by: gkrishnag
4 Replies

3. UNIX for Dummies Questions & Answers

Binary txt file received when i use uuencode to send txt file as attachment

Hi, I have already read a lot of posts on sending attachments in unix...but none of them were of help for my problem...so here goes.. i wanna attach a text file and send to a mail id..used the following code : uuencode "$File1" "$File1" ;|mail -s "$Mail_sub" abc@abc.com it works... (2 Replies)
Discussion started by: ash22
2 Replies

4. Shell Programming and Scripting

Script for removing text from a txt file

Hello, So I wanted to write a very simple script to remove some information from a text file and save it as something else. For example I have a text file (let's call it txt) with three rows of numbers: 0 0 1 9 8 7 5 0 6 7 9 0 0 7 9 8 1 1 6 4 0 6 0 0 9 8 4 6 0 9 2 8 1 And I want to... (2 Replies)
Discussion started by: hertingm
2 Replies

5. Shell Programming and Scripting

how to check the file data type(ascii or binary)

hi i am receiving a file from one system , i have to verify the format of the file data i.e whether the data is in acii format or binary format, please help thanks in advance satya (1 Reply)
Discussion started by: Satyak
1 Replies

6. Programming

writing binary/struct data to file

I am trying to write binary data to a file. My program below: #include <stdlib.h> #include <stdio.h> struct tinner { int j; int k; }; struct touter { int i; struct tinner *inner; }; int main() { struct touter data; data.i = 10; struct tinner... (4 Replies)
Discussion started by: radiatejava
4 Replies

7. Shell Programming and Scripting

To log binary file output to a txt file

Hi, I wrote a small script whose function is to execute the postemsg provided if the threshold breaches. I want to log this postemsg messages to a log file. But I am not able to do. Can someone throw some light on how to log the output of this. I am pasting a snippet of that code. ... (2 Replies)
Discussion started by: dbashyam
2 Replies

8. Shell Programming and Scripting

Data extraction from .txt file

Hey all, i´ve got the following problem: i´m aquiring data with an instrument and i get data in a .txt file. This is how the txt file looks like: Report of AU program poptau F1P=-49.986ppm F2P=-110.014ppm Target directory for serfile: D:/data/Spect500/nmr/Thoma/882 Linear... (17 Replies)
Discussion started by: expikx
17 Replies

9. Windows & DOS: Issues & Discussions

Xterm logging on Cygwin/X - binary data in log file.

I have Cygwin/X installed on Windows 7. In an xterm, I turned on logging via Main Options > Log to File. When I open my log file with Vim I get a warning that it might be binary. Looking through the file I see what I think are VT datastream escape characters. It makes it hard to use the... (1 Reply)
Discussion started by: gctaylor
1 Replies

10. UNIX for Dummies Questions & Answers

Removing PATTERN from txt without removing lines and general text formatting

Hi Everybody! First post! Totally noobie. I'm using the terminal to read a poorly formatted book. The text file contains, in the middle of paragraphs, hyphenation to split words that are supposed to be on multiple pages. It looks ve -- ry much like this. I was hoping to use grep -v " -- "... (5 Replies)
Discussion started by: AxeHandle
5 Replies
XDIFF_STRING_RABDIFF(3) 						 1						   XDIFF_STRING_RABDIFF(3)

xdiff_string_rabdiff - Make binary diff of two strings using the Rabin's polynomial fingerprinting algorithm

SYNOPSIS
string xdiff_string_bdiff (string $old_data, string $new_data) DESCRIPTION
Makes a binary diff of two strings and returns the result. The difference between this function and xdiff_string_bdiff(3) is different algorithm used which should result in faster execution and smaller diff produced. This function works with both text and binary data. Resulting patch can be later applied using xdiff_string_bpatch(3)/xdiff_file_bpatch(3). For more details about differences between algorithm used please check libxdiff website. PARAMETERS
o $old_data - First string with binary data. It acts as "old" data. o $new_data - Second string with binary data. It acts as "new" data. RETURN VALUES
Returns string with binary diff containing differences between "old" and "new" data or FALSE if an internal error occurred. SEE ALSO
xdiff_string_bpatch(3). PHP Documentation Group XDIFF_STRING_RABDIFF(3)
All times are GMT -4. The time now is 01:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy