The UNIX and Linux Forums  
Hallo und herzlich Willkommen aus den Vereinigten Staaten, die UNIX-und Linux-Foren! Vielen Dank für Ihren Besuch und die Teilnahme an unserem Global Community.

Go Back   Die UNIX-und Linux-Foren > Top Foren > UNIX for Dummies Questions & Answers
.
Google unix.com



UNIX for Dummies Questions & Answers Wenn Sie nicht sicher sind, wo Sie eine UNIX-oder Linux-Frage, post it here. Alle UNIX-und Linux-Anfänger willkommen!

Mehr UNIX-und Linux-Forum Themen Vielleicht finden Sie hilfreiche
Faden Thread Starter Forum Antworten Last Post
Induzieren Swapping auf Solaris dangral SUN Solaris 2 03-06-2008 06:12 PM
Swapping Esaia SuSE 3 06-11-2006 04:09 PM
wie man Swapping Infos leo UNIX for Dummies Questions & Answers 2 05-06-2004 04:30 PM
Paging und Swapping ST2000 Dateisysteme, Festplatten und Memory 2 04-30-2004 02:47 PM
Swapping Fragen 98_1LE UNIX for Dummies Questions & Answers 1 08-07-2001 11:43 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Suche diesen Thread Rate Thread Anzeige-Modi
  #1 (permalink)  
Old 06-24-2009
Jahn Jahn is offline
Registrierte Nutzer
  
 

Registriert seit: Mai 2009
Beiträge: 9
Swapping im VI-Editor

Hi,

Ich bin versucht zu ersetzen, mehrere ähnliche Wörter mit einem anderen Wort in vi. Hier ist, was ich geschrieben habe für das Skript:

3dTcat-prefix SuperBrik_4WAY_HRF ../JULY10_2007A/results2TENT/stats.JULY10_2007A + tlrc ../JULY10_2007G/results2TENT/stats.JULY10_2007G + tlrc ../JULY10_2007I/results2TENT/stats.JULY10_2007I + tlrc ../JULY11_2007F/results2TENT/stats.JULY11_2007F + tlrc ../JULY11_2007J/results2TENT/stats.JULY11_2007J + tlrc ../JULY12_2007A/results2TENT/stats.JULY12_2007A + tlrc ../JULY12_2007B/results2TENT/stats.JULY12_2007B + tlrc ../JULY12_2007I/results2TENT/stats.JULY12_2007I + tlrc ../JULY12_2007J/results2TENT/stats.JULY12_2007J + tlrc ../JUNE13_2007A/results2TENT/stats.JUNE13_2007A + tlrc ../JUNE13_2007B/results2TENT/stats.JUNE13_2007B + tlrc ../JUNE13_2007C/results2TENT/stats.JUNE13_2007C + tlrc .. / JUNE13_2007E/results2TENT/stats.JUNE13_2007E + tlrc ../JUNE13_2007G/results2TENT/stats.JUNE13_2007G + tlrc ../JUNE13_2007I/results2TENT/stats.JUNE13_2007I + tlrc ../JUNE14_2007D/results2TENT/stats.JUNE14_2007D + tlrc ../JUNE14_2007H / results2TENT/stats.JUNE14_2007H + tlrc ../JUNE15_2007A/results2TENT/stats.JUNE15_2007A + tlrc


Was will ich tun, ist die Stelle des "stats.J * + tlrc" mit "displayBriks". Ich bin mit der Verwendung der: s / Befehl zum Suchen und Ersetzen von mehreren identischen Worten, bin aber nicht sicher, wie das geht, für einen regulären Ausdruck in vi. Eine Idee, wo ich anfangen soll?

Danke,

Jahn -
  #2 (permalink)  
Old 06-24-2009
fpmurphy's Avatar
fpmurphy fpmurphy is offline Forum Staff  
Moderator
  
 

Join Date: Dezember 2003
Ort: Florida
Beiträge: 1923
Vielleicht ein Beispiel würde helfen. Angenommen, Sie haben den folgenden Text-Datei
Code:
abcdefg
faaaag
accxxcck
abbde
und verwenden möchten, vi zu suchen und ersetzen Sie alle Instanzen von 'b', 'c', 'd' und 'e' mit 'Q',
können Sie mit dem folgenden Befehl:% s / [werden] / Q / g ", die Ergebnisse in
Code:
aQQQQfg
faaaag
aQQxxQQk
aQQQQ
Hier ist eine Ausnahme von einem typischen vi man-Seite zu ersetzen:
Code:
    [range] s[ubstitute] [/pattern/replace/] [options] [count] [flags]
    [range] & [options] [count] [flags]
    [range] ~ [options] [count] [flags]
        Make substitutions. In the substitution string, the characters ~ and %
        may have special meanings. If the entire replace pattern is a percent
        sign (%), the previous replacement pattern is used. (This can be
        useful for repeating substitutions that contain back references.) The
        special character ~ inserts the previous replacement string into this
        replacement string.
        The options can be any of the following:

        c
            Ask for confirmation before replacing the text.

        g
            Perform the replacement on all occurrences of the regular
            expression on the line.

        r
            If no regular expression was specified, use the most recent
            regular expression (used for a search) rather than the same
            regular expression as used for the last substitute command.
Reply

Lesezeichen

Thread Tools Suche diesen Thread
Suche diesen Thread:

Erweiterte Suche
Anzeige-Modi Rate this thread
Rate this thread:

Forumregeln
Du möglicherweise nicht neue Themen
Du möglicherweise nicht nach Antworten
Du möglicherweise nicht post-Anlagen
Du möglicherweise nicht bearbeiten Sie Ihre Beiträge

BB-Code ist Auf
Smilies sind Auf
[IMG] Code Auf
HTML-Code ist Aus
Trackbacks sind Auf
Pingbacks sind Auf
Refbacks sind Auf




Alle Zeiten sind GMT -4. Es ist jetzt 12:04 AM.


Powered by: vBulletin, Copyright © 2000 - 2006, Jelsoft Enterprises Ltd. Sprachliche Übersetzungen Powered by .
vBCredits v1.4 Copyright © 2007 - 2008, PixelFX Studios
Die UNIX-und Linux-Foren Content © Copyright 1993-2009. Alle Rechte Reserved.Ad Management von RedTyger

Content Relevant URLs durch vBSEO 3.2.0