Sponsored Content
Top Forums Shell Programming and Scripting Removing CRLF combo but not CR or LF when alone Post 302993544 by qqp on Saturday 11th of March 2017 12:44:11 AM
Old 03-11-2017
This didn't work. The new file was created but:

Instances of LF were changed to CRLF and original instances of CRLF were ignored.

Last edited by rbatte1; 06-08-2017 at 04:05 AM.. Reason: Joined broken lines
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Modem/Sound combo

I just got yet another PI! yay! :D . one problem... the sound/modem card is not detected by the kernel or even by windows PnP! i dunno of any UNIX driverDB online, but if you could point me to one, it would be fantastic! (4 Replies)
Discussion started by: boris888
4 Replies

2. Shell Programming and Scripting

Add CRLF is probably simple!

I am building a script that will execute programs using records/fields in a file as arguments. Before I start testing that, I am working on reading the file properly and using printf to display the fields in the file. I used typeset to format my output. Now all I need is to figure out how to... (1 Reply)
Discussion started by: Skyybugg
1 Replies

3. Shell Programming and Scripting

grep, awk, nawk combo

I have 2 files: File1 "aa","server","001-9031234-001", File2 001-9031234-001|12345 Both files have many lines of text. Each line needs to be evaluated. I need to look at the value of the third field in File 1. Then look for that same value in File 2 and assign the value of Field 2... (5 Replies)
Discussion started by: scriptr2be
5 Replies

4. Shell Programming and Scripting

Issue with a file that contains CRLF

I have a nawk that reads in a log file and outputs a file that matches my search. IFS=" " while read record do `echo $record | nawk 'BEGIN { FS=" " } { type_record=substr($0, 1, 1); if (... (14 Replies)
Discussion started by: Pablo_beezo
14 Replies

5. Web Development

CRLF to LF PHP

So I have this PHP script that takes info from HTML form and saves the info to a txt file. Here is the code <?php $input = $_POST; $dateposted = date("m-d-Y-His"); $fp = fopen("/some/location/public_html/sh/$dateposted.txt", "w"); fwrite($fp, $input.).'&nbsp;'; fclose($fp);... (16 Replies)
Discussion started by: GroveTuckey
16 Replies

6. Shell Programming and Scripting

Combo for text

Hello all, i need to extract a part from an API output. Imagine this is the output : "result": "result": i need to use only the "hello my name is Mike" in the second line, without " " how can i do that? Thanks in advance Kind Regards and congrats for the great forum. (2 Replies)
Discussion started by: Board27
2 Replies
MIME::Decoder::NBit(3)					User Contributed Perl Documentation				    MIME::Decoder::NBit(3)

NAME
MIME::Decoder::NBit - encode/decode a "7bit" or "8bit" stream SYNOPSIS
A generic decoder object; see MIME::Decoder for usage. DESCRIPTION
This is a MIME::Decoder subclass for the "7bit" and "8bit" content transfer encodings. These are not "encodings" per se: rather, they are simply assertions of the content of the message. From RFC-2045 Section 6.2.: Three transformations are currently defined: identity, the "quoted- printable" encoding, and the "base64" encoding. The domains are "binary", "8bit" and "7bit". The Content-Transfer-Encoding values "7bit", "8bit", and "binary" all mean that the identity (i.e. NO) encoding transformation has been performed. As such, they serve simply as indicators of the domain of the body data, and provide useful information about the sort of encoding that might be needed for transmission in a given transport system. In keeping with this: as of MIME-tools 4.x, this class does no modification of its input when encoding; all it does is attempt to detect violations of the 7bit/8bit assertion, and issue a warning (one per message) if any are found. Legal 7bit data RFC-2045 Section 2.7 defines legal "7bit" data: "7bit data" refers to data that is all represented as relatively short lines with 998 octets or less between CRLF line separation sequences [RFC-821]. No octets with decimal values greater than 127 are allowed and neither are NULs (octets with decimal value 0). CR (decimal value 13) and LF (decimal value 10) octets only occur as part of CRLF line separation sequences. Legal 8bit data RFC-2045 Section 2.8 defines legal "8bit" data: "8bit data" refers to data that is all represented as relatively short lines with 998 octets or less between CRLF line separation sequences [RFC-821]), but octets with decimal values greater than 127 may be used. As with "7bit data" CR and LF octets only occur as part of CRLF line separation sequences and no NULs are allowed. How decoding is done The decoder does a line-by-line pass-through from input to output, leaving the data unchanged except that an end-of-line sequence of CRLF is converted to a newline " ". Given the line-oriented nature of 7bit and 8bit, this seems relatively sensible. How encoding is done The encoder does a line-by-line pass-through from input to output, and simply attempts to detect violations of the "7bit"/"8bit" domain. The default action is to warn once per encoding if violations are detected; the warnings may be silenced with the QUIET configuration of MIME::Tools. SEE ALSO
MIME::Decoder AUTHOR
Eryq (eryq@zeegee.com), ZeeGee Software Inc (http://www.zeegee.com). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.2 2012-06-08 MIME::Decoder::NBit(3)
All times are GMT -4. The time now is 08:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy