Sponsored Content
Top Forums Shell Programming and Scripting Add a carriage return after every sorted field Post 302977186 by jacki on Wednesday 13th of July 2016 05:11:51 PM
Old 07-13-2016
thanks @rdrtx1.

That works for the most part.I am good.

@Don I will keep that in mind for next time.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Capture carriage return.

I try to test the carriage return in a variable. $ LENGTH=`expr $VARIABLE : ".*"` will return the length of the variable. But this doesn't work if $VARIABLE has zero length. Any help will be well appreciated. Thanks in advance. Giovanni (4 Replies)
Discussion started by: gio123bg
4 Replies

2. Shell Programming and Scripting

Dont want carriage return

I have observed with print & echo, they produce carriage return <CR> or newline, after they display string next to them. Is there anyway to avoide these <CR> after the intended string is displayed? (3 Replies)
Discussion started by: videsh77
3 Replies

3. Shell Programming and Scripting

add carriage return at end of file

Hi I would like to add carriage return at end of file, because we need to mask the customer names for detailed records. Some what the file doesnot have carriage at end of line of last record.So that i 'll get 2 records when use ---aa.txt----- 1|aaa|bbb|ccc 2|bbbb|hghgh|ggg 000002 tail... (2 Replies)
Discussion started by: HAA
2 Replies

4. UNIX for Dummies Questions & Answers

carriage return and linefeed

hi can anyone please tell me the difference between carriage return, linefeed and newline ? (2 Replies)
Discussion started by: streetfi8er
2 Replies

5. Shell Programming and Scripting

2 carriage return within a record

Hi all, need your help in replacing carriage return in a record. Input: col1|col2|col3|col4|col5|col6|col7|col8|col9|col10 1|aa|bb|cc|dd|eee eee|ff|ggggg|hh hhh|iii 2|zz|yy|xx|ww|vv|uu|tt|ss|rr Output: col1|col2|col3|col4|col5|col6|col7|col8|col9|col10... (12 Replies)
Discussion started by: agathaeleanor
12 Replies

6. Shell Programming and Scripting

Carriage return ksh

Hello, How do i usecarriage return in ksh. I want to do an echo "bla bla" and another echo "bla bla" will appear and replace the first echo on screen. I tried: until ; do echo "bla bla \r" done please advice. Thanks. (3 Replies)
Discussion started by: LiorAmitai
3 Replies

7. Shell Programming and Scripting

Awk to remove carriage return from 65th field

Hi, I have a pipe delimited file. There are around 700 columns in the file. The 65th column has carriage return which is causing read issue with our ETL process. I would like to replace the new line characters in 65th field with "nothing" i have return the following code and need help to... (7 Replies)
Discussion started by: pinnacle
7 Replies

8. Shell Programming and Scripting

Substitute \n with carriage return

Hello all, I've a flat file in the following format: AB\001\CDED\001\ABC\001\nEG\001\HIJF\001\EFG\001\nHI\003\HIUL\003\HIJ\003 And I want to substitute \n with the carriage return. Any help is appreciated! Regards, - Seth (8 Replies)
Discussion started by: sethmj
8 Replies

9. UNIX for Dummies Questions & Answers

Remove carriage return

I need to remove the carriage return comes inbetween the record. Need to have CR only at the end. I used the below command. tr -d '\n' < filewithcarriagereturns > filewithoutcarriagereturns But its removing all the CR and giving one line output. Input File: 12345 abcdegh... (11 Replies)
Discussion started by: srvn_saru
11 Replies

10. UNIX for Beginners Questions & Answers

awk Command to add Carriage Return and Line Feed

Hello, Can someone please share a Simple AWK command to append Carriage Return & Line Feed to the end of the file, If the Carriage Return & Line Feed does not exist ! Thanks (16 Replies)
Discussion started by: rosebud123
16 Replies
PRIVOXY-LOG-PARSER(1)					User Contributed Perl Documentation				     PRIVOXY-LOG-PARSER(1)

NAME
privoxy-log-parser - A parser and syntax-highlighter for Privoxy log messages SYNOPSIS
privoxy-log-parser [--accept-unknown-messages] [--html-output] [--no-msecs] [--no-syntax-higlighting] [--statistics] [--shorten-thread-ids] [--show-ineffective-filters] [--url-statistics-threshold] [--version] DESCRIPTION
privoxy-log-parser reads Privoxy log messages and - syntax-highlights recognized lines, - reformats some of them for easier comprehension, - filters out less useful messages, and - (in some cases) calculates additional information, like the compression ratio or how a filter affected the content size. With privoxy-log-parser you should be able to increase Privoxy's log level without getting confused by the resulting amount of output. For example for "debug 64" privoxy-log-parser will (by default) only show messages that affect the content. If a filter doesn't cause any hits, privoxy-log-parser will hide the "filter foo caused 0 hits" message. OPTIONS
[--accept-unknown-messages] Don't print warnings in case of unknown messages, just don't highlight them. [--host-statistics-threshold] Only show the request count for a host if it's above or equal to the given threshold. If the threshold is 0, host statistics are disabled. [--html-output] Use HTML and CSS for the syntax highlighting. If this option is omitted, ANSI escape sequences are used unless --no-syntax-highlighting is active. This option is only intended to make embedding log excerpts in web pages easier. It does not escape any input! [--no-msecs] Don't expect milisecond resolution [--no-syntax-highlighting] Disable syntax-highlighting. Useful when the filtered output is piped into less in which case the ANSI control codes don't work, or if the terminal itself doesn't support the control codes. [--shorten-thread-ids] Shorten the thread ids to a three-digit decimal number. Note that the mapping from thread ids to shortened ids is created at run-time and thus varies with the input. [--show-ineffective-filters] Don't suppress log lines for filters that didn't modify the content. [--statistics] Gather various statistics instead of syntax highlighting log messages. This is an experimental feature, if the results look wrong they very well might be. Also note that the results are pretty much guaranteed to be incorrect if Privoxy and Privoxy-Log-Parser aren't in sync. [--unbreak-lines-only] Tries to fix lines that got messed up by a broken or interestingly configured mail client and thus are no longer recognized properly. Only fixes some breakage, but may be good enough or at least better than nothing. Doesn't do anything else, so you probably want to pipe the output into privoxy-log-parser again. [--url-statistics-threshold] Only show the request count for a resource if it's above or equal to the given threshold. If the threshold is 0, URL statistics are disabled. [--version] Print version and exit. EXAMPLES
To monitor a log file: tail -F /usr/jails/privoxy-jail/var/log/privoxy/privoxy.log | privoxy-log-parser Replace '-F' with '-f' if your tail implementation lacks '-F' support or if the log won't get rotated anyway. The log file location depends on your system (Doh!). To monitor Privoxy without having it write to a log file: privoxy --no-daemon /usr/jails/privoxy-jail/usr/local/etc/privoxy/config 2>&1 | privoxy-log-parser Again, the config file location depends on your system. Output redirection depends on your shell, the above works with bourne shells. To read a processed Privoxy log file from top to bottom, letting the content scroll by slightly faster than you can read: privoxy-log-parser < /usr/jails/privoxy-jail/var/log/privoxy/privoxy.log This is probably only useful to fill screens in the background of haxor movies. CAVEATS
Syntax highlighting with ANSI escape sequences will look strange if your background color isn't black. Some messages aren't recognized yet and will not be fully highlighted. privoxy-log-parser is developed with Privoxy 3.0.7 or later in mind, using earlier Privoxy versions will probably result in an increased amount of unrecognized log lines. Privoxy's log files tend to be rather large. If you use HTML highlighting some browsers can't handle them, get confused and will eventually crash because of segmentation faults or unexpected exceptions. This is a problem in the browser and not privoxy-log-parser's fault. BUGS
Many settings can't be controlled through command line options yet. SEE ALSO
privoxy(1) AUTHOR
Fabian Keil <fk@fabiankeil.de> perl v5.14.2 2012-05-18 PRIVOXY-LOG-PARSER(1)
All times are GMT -4. The time now is 09:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy