Sponsored Content
Top Forums Shell Programming and Scripting why am I losing line-end chars Post 302408553 by duderonomy on Monday 29th of March 2010 10:55:33 PM
Old 03-29-2010
You peeps are awesome!
Thank you for the shell quoting refresher course!

Cheers!

Last edited by duderonomy; 03-30-2010 at 01:16 AM.. Reason: keeping it "G"! lol!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Using PERL to append chars to each line

I tried using SED to do this, but I'm not having any luck with it. See the previous thread here. I have a program called AMStracker (on OS X) that spits out the values of the motion sensor in the HDD. It has output that looks like this: . . 3 0 -75 3 0 -76 3 0 -77 . . I need to... (5 Replies)
Discussion started by: c0nn0r
5 Replies

2. Shell Programming and Scripting

to append few chars at the end of a file

hi i want to open a file at runtime append few chars at the end of each line all these i want to have done automatically how to do it (2 Replies)
Discussion started by: trichyselva
2 Replies

3. Shell Programming and Scripting

How to convert C source from 8bit chars to 16bit chars?

I was using the following bash command inside the emacs compile command to search C++ source code: grep -inr --include='*.h' --include='*.cpp' '"' * | sed "/include/d" | sed "/_T/d" | sed '/^ *\/\//d' | sed '/extern/d' Emacs will then position me in the correct file and at the correct line... (0 Replies)
Discussion started by: siegfried
0 Replies

4. Shell Programming and Scripting

Get multiple line content between two chars

Hello - I have a file that has the something like the following : REM CREATE TABLE lots of text REM table specifc creation text ; REM ALTER TABLE lots of text REM text specific to the the alter command REM could be more lines of text; What I need is to get all the lines for the ALTER... (2 Replies)
Discussion started by: Feliz
2 Replies

5. Shell Programming and Scripting

insert new line at found chars

Hey gang, I have: XXZZXXZZXX 123 asdaffggh dfghyrgr ertyhdhh XXZZXXZZXX 234 sdg XXZZXXZZXX 456 gfg fggfd That is all on one line. Very simply put I want to do is something like: sed s'/XXZZXXZZXX /\n/g' or tr 'XXZZXXZZXX ' '/n' I have tried various things but can never get the desired... (6 Replies)
Discussion started by: crowman
6 Replies

6. Shell Programming and Scripting

find 4 chars on 2nd line, 44 chars over

I know this should be simple, but I've been manning sed awk grep and find and am stupidly stumped :( I'm trying to use sed (or awk, find, etc) to find 4 characters on the second line of a file.txt 44-47 characters in. I can find lots of sed things for lines, but not characters. (4 Replies)
Discussion started by: unclecameron
4 Replies

7. Shell Programming and Scripting

sed - how to insert chars into a line

Hi I'm new to sed, and need to add characters into a specific location of a file, the fileds are tab seperated. text <tab> <tab> text <tab> text EOL I need to add more characters to the line to look like this: text <tab> <tab> newtext <tab> text <tab> text EOL Any ideas? (2 Replies)
Discussion started by: tangentviper
2 Replies

8. Shell Programming and Scripting

How to erase junk Chars coming in only the first line

I have a file containing few thousands of lines. when I do cat on it , i find it having two special Chars at the start of first line alone as shown down here. ÿþHDR|20111024|01 If i delete this line and do a cat on file , the current first line is shown to have the same special Chars. ... (3 Replies)
Discussion started by: subramanian2008
3 Replies

9. UNIX for Dummies Questions & Answers

Grep with special chars line by line

I have a file that includes strings with special characters, eg file1 line: 1 - special 1 line: = 4 line; -3 etc How can I grep the lines of file1 from file2, line by line? I used fgrep and egrep to grep a particular line and worked fine, but when I used: cat file1|while read line;do... (2 Replies)
Discussion started by: FelipeAd
2 Replies

10. UNIX for Beginners Questions & Answers

Shell script to split data with a delimiter having chars and special chars

Hi Team, I have a file a1.txt with data as follows. dfjakjf...asdfkasj</EnableQuotedIDs><SQL><SelectStatement modified='1' type='string'><! The delimiter string: <SelectStatement modified='1' type='string'><! dlm="<SelectStatement modified='1' type='string'><! The above command is... (7 Replies)
Discussion started by: kmanivan82
7 Replies
Courier::Filter::Logger(3pm)				User Contributed Perl Documentation			      Courier::Filter::Logger(3pm)

NAME
Courier::Filter::Logger - Abstract base class for loggers used by the Courier::Filter framework SYNOPSIS
Courier::Filter logging use Courier::Filter::Logger::My; # Need to use a non-abstract sub-class. my $logger = Courier::Filter::Logger::My->new(%options); # For use in an individual filter module: my $module = Courier::Filter::Module::My->new( ... logger => $logger, ... ); # For use as a global Courier::Filter logger object: my $filter = Courier::Filter->new( ... logger => $logger, ... ); Deriving new logger classes package Courier::Filter::Logger::My; use base qw(Courier::Filter::Logger); DESCRIPTION
Sub-classes of Courier::Filter::Logger are used by the Courier::Filter mail filtering framework and its filter modules for the logging of errors and message rejections to arbitrary targets, like file handles or databases. When overriding a method in a derived class, do not forget calling the inherited method from your overridden method. Constructor The following constructor is provided and may be overridden: new(%options): returns Courier::Filter::Logger Creates a new logger using the %options given as a list of key/value pairs. Initializes the logger, by creating/opening I/O handles, connecting to databases, etc.. "Courier::Filter::Logger::new()" creates a hash-ref as an object of the invoked class, and stores the %options in it, but does nothing else. Destructor The following destructor is provided and may be overridden: destroy Uninitializes the logger, by closing I/O handles, disconnecting from databases, etc.. "Courier::Filter::Logger::destroy()" does nothing. Sub-classes may override this method and define clean-up behavior. Instance methods The following instance methods are provided and may be overridden: log_error($text) Logs the error message given as $text (a string which may contain newlines). "Courier::Filter::Logger::log_error()" does nothing and should be overridden. log_rejected_message($message, $reason) Logs the Courier::Message given as $message as having been rejected due to $reason (a string which may contain newlines). "Courier::Filter::Logger::log_rejected_message()" does nothing and should be overridden. SEE ALSO
Courier::Filter, Courier::Filter::Module. For a list of prepared loggers that come with Courier::Filter, see "Bundled Courier::Filter loggers" in Courier::Filter::Overview. For AVAILABILITY, SUPPORT, and LICENSE information, see Courier::Filter::Overview. AUTHOR
Julian Mehnle <julian@mehnle.net> perl v5.14.2 2011-12-27 Courier::Filter::Logger(3pm)
All times are GMT -4. The time now is 05:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy