Sponsored Content
Top Forums Shell Programming and Scripting Removing CRLF combo but not CR or LF when alone Post 302993576 by Scrutinizer on Saturday 11th of March 2017 11:07:57 AM
Old 03-11-2017
Try:
Code:
awk '{sub(/^\n/,x)}1' RS='\r' ORS='\r' file

 

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
FINGERD(8)						      System Manager's Manual							FINGERD(8)

NAME
fingerd, in.fingerd - remote user information server SYNOPSIS
finger stream tcp nowait nobody /usr/sbin/in.fingerd in.fingerd tcpd finger /usr/sbin/in.fingerd in.fingerd DESCRIPTION
Fingerd is a simple protocol based on RFC742 that provides an interface to the Name and Finger programs at several network sites. The pro- gram is supposed to return a friendly, human-oriented status report on either the system at the moment or a particular person in depth. There is no required format and the protocol consists mostly of specifying a single ``command line''. Fingerd listens for TCP requests at port 79. Once connected it reads a single command line terminated by a <CRLF> which is passed to fin- ger(1). Fingerd closes its connections as soon as the output is finished. If the line is null (i.e. just a <CRLF> is sent) then finger returns a ``default'' report that lists all people logged into the system at that moment. If a user name is specified (e.g. eric<CRLF>) then the response lists more extended information for only that particular user, whether logged in or not. Allowable ``names'' in the command line include both ``login names'' and ``user names''. If a name is ambiguous, all possible derivations are returned. SEE ALSO
finger(1). BUGS
Connecting directly to the server from a TIP or an equally narrow-minded TELNET-protocol user program can result in meaningless attempts at option negotiation being sent to the server, which will foul up the command line interpretation. Fingerd should be taught to filter out IAC's and perhaps even respond negatively (IAC WON'T) to all option commands received. 4.3 Berkeley Distribution May 23, 1986 FINGERD(8)
All times are GMT -4. The time now is 12:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy