Sponsored Content
Top Forums Shell Programming and Scripting sed replace not work Pls. help me Post 302454766 by kurumi on Monday 20th of September 2010 02:39:46 AM
Old 09-20-2010
Code:
$ ruby -ne 'print if gsub(/\s{2,}/,"@")' file
66875964560@1982589@90825890001@90825890001@3@15/12/2007 14:25:14@22/03/2010 6:06:13@20/01/2010 3:28:39
66873064490@1925912@90259120001@90259120001@5@02/04/2009 1:51:31@30/10/2009 3:08:34@13/09/2009 8:24:33
66851682693@1982589@90825890001@90825890001@3@15/12/2007 14:05:43@23/05/2010 5:20:39@15/04/2010 3:07:33
66836281161@1982545@90825970001@90825970001@3@27/02/2008 12:00:17@14/08/2009 10:25:01@06/08/2009 3:14:48
66894080622@1982589@90825890001@90825890001@3@15/12/2007 15:35:02@02/10/2009 17:25:01@21/09/2009 3:17:53
66873521161@1982589@90825890001@90825890001@3@15/12/2007 14:22:38@22/07/2009 18:22:05@23/06/2009 2:55:06
66873858124@1982589@90825890001@90825890001@3@15/12/2007 22:45:50@25/11/2008 4:17:27@29/09/2008 4:52:01
66869840940@1982545@90825970001@90825970001@2@19/02/2008 19:48:13@26/09/2010 3:35:36@27/08/2010 3:35:36
66816414077@1982545@90825970001@90825970001@2@01/09/2007 10:32:47@09/10/2010 3:51:30@09/09/2010 3:51:30
66875191279@1982589@90825890001@90825890001@3@15/12/2007 22:40:25@26/10/2008 3:53:01@29/08/2008 16:25:09
66869885838@1982590@90825970008@90825970008@3@25/09/2009 10:36:56@26/09/2009 21:25:11@25/05/2009 22:28:11
66874122273@1982590@90825970008@90825970008@3@15/03/2009 18:02:47@24/04/2009 21:51:04@31/03/2009 3:26:37

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

replace word with using "sed" not work...

Hi, I have a xml text file with the following data, I would like replace F0</Number> to F</Number> only. i used sed to replace, but it not work!! anyone can help? <Number>11 20 03 22 23 21 91 00 F0</Number> <Number>12 20 03 20 99 21 91 20 F0</Number> <Number>10 21 03 21 78 21 92 27... (28 Replies)
Discussion started by: happyv
28 Replies

2. Shell Programming and Scripting

tricky search replace: Pls help.

Hi, I have a a mysql dump text file. I need to replace the below line ------------------------------------------------------------------- ) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=latin1; ------------------------------------------------------------------- with this text ... (5 Replies)
Discussion started by: vaibhavs
5 Replies

3. Shell Programming and Scripting

My script does not work - could you pls help?

Hi all, I put together a script that seems not working as I would like to and after spending hours to find the problem I decided to ask your help. The thing I am trying to do is call AWK command on the TRUE branch of if statement. Else branch should only print out a message to screen. This... (1 Reply)
Discussion started by: BearCheese
1 Replies

4. Shell Programming and Scripting

pls help! complex find and replace

help pls... i would like to change this CURVE2 565489 789458 1258649 random data here... CURVE2 565489 568795 6548921 random data here... CURVE2 565489 123598 6446259 random data here... CURVE2 565489 672956 2489657 into this CURVE2 565489 586423 1258649 random data here...... (2 Replies)
Discussion started by: lakanino
2 Replies

5. Shell Programming and Scripting

SED - replace with new line didn´t work for solaris

Hi This is what I was trying to do, comment one line and add something different in a new line right next. This is the command I want to do more .profile | sed 's,STRING1, #STRING1 NEWLINE STRING2,' (I´m using ',' because my string is something like this exec... (3 Replies)
Discussion started by: alcalina
3 Replies

6. Shell Programming and Scripting

Does Sed Search/Replace Work For Multiple Matches On The Same Line?

Hello, I would like to delete all the footnotes in all my htm files. Hence, I have to delete the whole font tag pairs, i.e. deleting everything between the begin/end font tags. I create a testfile, of which data parts of all four lines are the same except for the number of font tag pairs,... (3 Replies)
Discussion started by: cibalo
3 Replies

7. Shell Programming and Scripting

Some sed help pls

Hello, I have made a list of files of which I want to remove strings beginning with <iframe and </iframe When I run the script I see the files fly along and the strings being removed. However, in the source files nothing has changed. Do I really need to write sed's result to a different... (3 Replies)
Discussion started by: algernonz
3 Replies

8. Shell Programming and Scripting

Replace string with sed doesn't work

Hello, Unfortunately I don't found any working solution for my problem :/ I have pass file for dovecot authorizing in this format: user@domain.tld:{SSHA}Ykx2KVG/a2FKzjnctFFC2qFnrk9nvRmW:5000:5000:::: . . ...Now, I want to write some sh script for password changing for grep'ed user, in... (5 Replies)
Discussion started by: vincenty
5 Replies

9. UNIX for Dummies Questions & Answers

Why does this SED example work?

$ x="/home/guru/temp/f1.txt" $ echo $x | sed 's^.*/^^' This will give the absolute path f1.txt. I don't understand WHY it works. How is it determining the last "/" character exactly? (7 Replies)
Discussion started by: glev2005
7 Replies

10. Red Hat

Centos server, had to replace the motherboard now the embedded NICs don't work

Basically what the title says. Had to replace the motherboard on an HP DL380 G6 today, of course now the embedded NICs don't work because the ifcfg-eth files have the MAC addresses for the embedded NICs from the old machine. How can I find the new/correct MAC addresses so I can edit the... (2 Replies)
Discussion started by: xdawg
2 Replies
IMPRESSIVE-GETTRANSITIONS(1)				      Debian GNU/Linux manual				      IMPRESSIVE-GETTRANSITIONS(1)

NAME
impressive-gettransitions - Generate Impressive info scripts for LaTeX presentations SYNOPSIS
impressive-gettransitions FILE.tex DESCRIPTION
A simple script to produce a .info file for use with Impressive, using special comments in a LaTeX/Beamer file. FILE.tex is a file to be parsed into .info file. For each /fullpath/blah.tex /fullpath/blah.pdf.info gets produced. SYNTAX
In the LaTeX document, impressive-gettransitions counts the pages to determine the PDF slide number of each one. The simpler page changes are automatically detected, that is: egin{frame} and: pause Other, more elaborated page changes must be noted with a %O comment: item<1-> Foo item<2-> Bar %O The transition to apply can be specified in a %O comment: egin{frame} %O SlideUp OPERATION
When the .info file corresponding to the LaTeX document already exist, impressive-gettransitions does not clear it, but only adds the transitions if finds to it. Thus, if you modified your document in a way that requires to completely replace the transitions, manually clear the PageProps section of the .info file. This can be done by running the following sed command: sed -i -e "/^PageProps = {/,/^}/d" FILE.info SEE ALSO
impressive(1) AUTHOR
impressive-gettransitions (originally gettransitions) has been written by Rob Reid. This manpage has been originally written by Yaroslav Halchenko <debian@onerussian.com>. Debian Project 2012-02-10 IMPRESSIVE-GETTRANSITIONS(1)
All times are GMT -4. The time now is 02:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy