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
PCRE_CONFIG(3)						     Library Functions Manual						    PCRE_CONFIG(3)

NAME
PCRE - Perl-compatible regular expressions SYNOPSIS
#include <pcre.h> int pcre_config(int what, void *where); DESCRIPTION
This function makes it possible for a client program to find out which optional features are available in the version of the PCRE library it is using. Its arguments are as follows: what A code specifying what information is required where Points to where to put the data The available codes are: PCRE_CONFIG_LINK_SIZE Internal link size: 2, 3, or 4 PCRE_CONFIG_MATCH_LIMIT Internal resource limit PCRE_CONFIG_MATCH_LIMIT_RECURSION Internal recursion depth limit PCRE_CONFIG_NEWLINE Value of the default newline sequence: 13 (0x000d) for CR 10 (0x000a) for LF 3338 (0x0d0a) for CRLF -2 for ANYCRLF -1 for ANY PCRE_CONFIG_BSR Indicates what R matches by default: 0 all Unicode line endings 1 CR, LF, or CRLF only PCRE_CONFIG_POSIX_MALLOC_THRESHOLD Threshold of return slots, above which malloc() is used by the POSIX API PCRE_CONFIG_STACKRECURSE Recursion implementation (1=stack 0=heap) PCRE_CONFIG_UTF8 Availability of UTF-8 support (1=yes 0=no) PCRE_CONFIG_UNICODE_PROPERTIES Availability of Unicode property support (1=yes 0=no) The function yields 0 on success or PCRE_ERROR_BADOPTION otherwise. There is a complete description of the PCRE native API in the pcreapi page and a description of the POSIX API in the pcreposix page. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +--------------------+-----------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +--------------------+-----------------+ |Availability | SUNWpcre | +--------------------+-----------------+ |Interface Stability | Uncommitted | +--------------------+-----------------+ NOTES
Source for PCRE is available on http://opensolaris.org. PCRE_CONFIG(3)
All times are GMT -4. The time now is 12:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy