Sponsored Content
Top Forums Shell Programming and Scripting Problem using egrep: spaces and newline Post 302336279 by vgersh99 on Tuesday 21st of July 2009 06:04:30 PM
Old 07-21-2009
Code:
tr -s ' ' '^' < myfile >myNewFile

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

problem escaping newline in ksh

Hi, I did the below. $ print "\\n" $ I am curious, why does \\n give two new lines? I would have thought that the first \ would escape the second \, and so we'd get \n printed. But we didn't. Any ideas? Thanks. (7 Replies)
Discussion started by: JamesByars
7 Replies

2. Shell Programming and Scripting

egrep understanding problem

Hi, Can anyone please let me know the meaning of this line,i am not able to understand the egrep part(egrep '^{1,2}).This will search for this combination in beginning but what does the values in {}signifies here. /bin/echo $WhenToRun | egrep '^{1,2}:$' >/dev/null (1 Reply)
Discussion started by: namishtiwari
1 Replies

3. Shell Programming and Scripting

egrep problem | printing next line?????

Hi !!! Dear People, Please help me with the following problem. consider this output: Top 5 Timed Events ~~~~~~~~~~~~ Total Event Waits Time (s) Ela Time ---------------------------- ------------ ----------- ----- CPU time ... (3 Replies)
Discussion started by: user__user3110
3 Replies

4. Shell Programming and Scripting

egrep problem

Hello Experts, I am trying to parse a gz file like this gzip -cd filename | xargs egrep -h -e '.*somepattern</TAG>' | grep -c '<TAG2>`date '+%Y-%m-%d'`</TAG2>' But I am getting an error : egrep cant open. Any ideas fellas? (1 Reply)
Discussion started by: King Nothing
1 Replies

5. Shell Programming and Scripting

Help with sed matching <tag1> newline spaces <tag2> and replace the value in the same string format

Hi, I'm very new to shell scripting and have searched google and this forum for quite some time now. I have the following in my xml file: <recipients> <member>value1</member> </recipients> I need to find a string <recipients> that follows with a new-line and bunch of spaces and... (5 Replies)
Discussion started by: mgharios
5 Replies

6. UNIX for Dummies Questions & Answers

Problem pattern redundancy with egrep

%%%%% (2 Replies)
Discussion started by: lucasvs
2 Replies

7. Shell Programming and Scripting

Problem with egrep and cat

Hello, I want to find some keywords in a dd image. I have created a keyword file (1.txt) and search the dd image using, cat /media/sdb1/test/c.dd.001 | strings | egrep -i --color -f 1.txt It works, But how can I get the file name and path? Many thanks. (7 Replies)
Discussion started by: yzy9951
7 Replies

8. Shell Programming and Scripting

Deleting newline and making output in single line with spaces

HI I have a file line vi Input 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 (7 Replies)
Discussion started by: Priya Amaresh
7 Replies

9. Shell Programming and Scripting

How to remove newline, tab, spaces in curly braces.. :( Pls Help?

Hi Everyone, in the below "xyz (Exception e)" part... after the curly braces, there is a new line and immediately few tabs are present before closing curly brace. xyz (Exception e) { } note: there can be one or more newlines between the curly braces. My desired output should be ... (6 Replies)
Discussion started by: NY_777
6 Replies

10. UNIX for Dummies Questions & Answers

Egrep problem

Hi everyone, Can someone look this over? find /oracle/diag/rdbms/*/*/trace -type f -name '*d00*.trc' -mtime 0 \ -exec egrep -c 'TNS-12535: TNS:operation timed out' '{}' '+' | awk -F: '{print $1}' | egrep -c '2015-01-22' usidp/trace/abcdef_d001_21751.trc:9 \... (1 Reply)
Discussion started by: bdby
1 Replies
ODFHIGHLIGHT(1p)					User Contributed Perl Documentation					  ODFHIGHLIGHT(1p)

NAME
odfhighlight - search, replace and highlight text in a document SYNOPSIS
odfhighlight "source.odt" "search string" -r "replacement" -o "target.odt" replaces "search string" by "replacement" in the file "source.odt", highlights each replacement with a yellow (default) backgound, then writes the resulting document as "target.odt" odfhighlight "myfile.odt" "search string" -color "green" highlights each occurrence of "search string" in "myfile.odt" with a green background color, without changing the text (without "-o" option, the changes apply to "myfile.odt" ARGUMENTS AND OPTIONS
Default behaviour With the "minimal" command line, with only a filename and a string as arguments, each matching string is highlighted with a yellow background and represented with the "Standard" style. Options -e --encoding "xxxxxx" character set to use, if different from the default -r --replacement "new string" "new string" is used as a replacement for "search string" -c --color "code" an RGB color code, expressed either as the concatenation of 3 comma-separated decimal values (each one in the range 0..255, ex: "72,61,139" for a dark slate blue), or a 6-digit hexadecimal number, preceded by a "#" (ex: #00ff00 for green) or, if a colormap is available and known in your OpenOffice::OODoc installation, a symbolic color name (ex: "sky blue") -s --stylename "name" the name of the color style (default: "MyHighlight"); the user must provide a style name that is not already in use in the document -p --property "property=value" This option can be repeated; each occurrence gives an additional property for the highlight style (font name, size, foreground color, ...). For example, with the combination of -p 'fo:color=#ff0000' and -p 'fo:font-size=18pt', the highlighted text will be made of 18pt-sized, red characters. In order to master these options, you should have some knowledge of the Form Objects (FO) vocabulary that is used in the OpenDocument specification. -o --output "filename" -t --target "filename" an alternative filename to save the modified document, when the source document must remain unchanged perl v5.14.2 2010-01-11 ODFHIGHLIGHT(1p)
All times are GMT -4. The time now is 05:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy