Sponsored Content
Top Forums Shell Programming and Scripting sed replace not work Pls. help me Post 302454761 by ooilinlove on Monday 20th of September 2010 02:33:30 AM
Old 09-20-2010
Hammer & Screwdriver sed replace not work Pls. help me

sed replace not work Pls. help me

I used sed command in my file
Code:
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

i use command ::
Code:
 sed 's/             /@/g'  myfile

but not work

i want to out put
Code:
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



How to get it ?
Can anybody help me out?

Thanks,
Oillie
 

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
FRESCOBALDI(1)						       LilyPond Music Editor						    FRESCOBALDI(1)

NAME
frescobaldi - LilyPond Music Editor SYNOPSIS
frescobaldi [Qt-options] [KDE-options] [options] files DESCRIPTION
LilyPond Music Editor OPTIONS
Arguments: files LilyPond files to open, may also be textedit URLs Options: --start <session> Session to start -n, --new Start a new instance -e, --encoding <enc> Encoding to use [UTF-8] -l, --line <num> Line number to go to, starting at 1 -c, --column <num> Column to go to, starting at 0 --smart Try to use smart line and column numbers Generic options: --help Show help about options --help-qt Show Qt specific options --help-kde Show KDE specific options --help-all Show all options --author Show author information -v, --version Show version information --license Show license information -- End of options KDE options: --caption <caption> Use 'caption' as name in the titlebar --icon <icon> Use 'icon' as the application icon --config <filename> Use alternative configuration file --nocrashhandler Disable crash handler, to get core dumps --waitforwm Waits for a WM_NET compatible windowmanager --style <style> sets the application GUI style --geometry <geometry> sets the client geometry of the main widget -- see man X for the argument format (usually WidthxHeight+XPos+YPos) Qt options: --display <displayname> Use the X-server display 'displayname' --session <sessionId> Restore the application for the given 'sessionId' --cmap Causes the application to install a private color map on an 8-bit display --ncols <count> Limits the number of colors allocated in the color cube on an 8-bit display, if the application is using the QApplication::ManyColor color specification --nograb tells Qt to never grab the mouse or the keyboard --dograb running under a debugger can cause an implicit --nograb, use --dograb to override --sync switches to synchronous mode for debugging --fn, --font <fontname> defines the application font --bg, --background <color> sets the default background color and an application palette (light and dark shades are calculated) --fg, --foreground <color> sets the default foreground color --btn, --button <color> sets the default button color --name <name> sets the application name --title <title> sets the application title (caption) --visual TrueColor forces the application to use a TrueColor visual on an 8-bit display --inputstyle <inputstyle> sets XIM (X Input Method) input style. Possible values are onthespot, overthespot, offthespot and root --im <XIM server> set XIM server --noxim disable XIM --reverse mirrors the whole layout of widgets --stylesheet <file.qss> applies the Qt stylesheet to the application widgets --graphicssystem <system> use a different graphics system instead of the default one, options are raster and opengl (experimental) SEE ALSO
Full user documentation is available through the KDE Help Center. You can also enter the URL help:/frescobaldi/ directly into konqueror or you can run `khelpcenter help:/frescobaldi/' from the command-line. AUTHORS
frescobaldi was written and is copyrighted by: Copyright (C) 2008-2010 Wilbert Berendsen <info@wilbertberendsen.nl> Copyright (C) 2009-2010 Pavel Fric <pavelfric@seznam.cz> Copyright (C) 2008 Henrik Evers <henrik.evers@gmx.de> Copyright (C) 2009 Georg Hennig <georg.hennig@web.de> Copyright (C) 2008-2009 Francisco Vila <francisco.vila@hispalinux.es> Copyright (C) 2008, 2010 Valentin Villenave <v.villenave@gmail.com> Copyright (C) 2009 David Bouriaud <david.bouriaud@ac-rouen.fr> Copyright (C) 2009-2010 Ryan Kavanagh <ryanakca@kubuntu.org> Copyright (C) 2009 Manuel A. Vazquez <xixirei@yahoo.es> Copyright (C) 2008-2009 Gianluca D'Orazio <gianluca.dorazio@gmail.com> Copyright (C) 2009-2010 Piotr Komorowski <piotr-komorowski@wp.pl> Copyright (C) 2008 <ru@li.org> Copyright (C) 2009 Serj Poltavski <serge.uliss@gmail.com> Copyright (C) 2008-2010 Server Acim <sacim@kde.org.tr> Copyright (C) 1999-2009 Gentoo Foundation Copyright (C) 2009 Artem Zolochevskiy <artem.zolochevskiy@gmail.com> This man page was written by Ryan Kavanagh <ryanakca@kubuntu.org>. Both are released under the GNU General Public License, version 2 or (at your option) any later version. K Desktop Environment August 2010 FRESCOBALDI(1)
All times are GMT -4. The time now is 08:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy