05-20-2009
Found the fix (aka: solution)
Thanks (again) to Padow, a slight change to his syntax solved the problem. Here is the syntax that worked:
:1,$s/ -I/\r/g
Note that I included a space in the seach-for text " -I". This allowed for the extra space to be removed so each line starts at the beginning.
Cheers!
Omega949
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies
2. UNIX for Dummies Questions & Answers
I have a text file with following content (3 lines)
filename : output.txt
first line:12/12/2008
second line:12/12/2008
third line:Y
I would like to know how we can replace 'Y' with 'N' in the 3rd line keeping 1st and 2nd lines same as what it was before.
I tried using cat output.txt... (4 Replies)
Discussion started by: santosham
4 Replies
3. Shell Programming and Scripting
Hi,
I wanted to add a newline character after every 100 characters in a file using a awk or shell without reading each line of the file.
I want to run a command on the complete file.
This does based on a string but i want to add a new line after every 100 characters ir-respective of the... (3 Replies)
Discussion started by: vijaykrc
3 Replies
4. Shell Programming and Scripting
Need to replace any control character in the string in perl
---------- Post updated at 04:22 PM ---------- Previous update was at 03:50 PM ----------
Any help !!!
Thanks in advance (2 Replies)
Discussion started by: hansini
2 Replies
5. Shell Programming and Scripting
Hello,
I am trying to search and replace but I don't know how to do it. My simple knowlegde in search and replace using sed is not helping me at all.
File:
its a cause value #22: dfg ggg
Cause value #1: aasfa fasdf
asfa value #22: affg gggg
Basically i want to replace the... (6 Replies)
Discussion started by: balan1983a
6 Replies
6. Shell Programming and Scripting
Hi
Input:
-
--
---
----
aa-bb-cc
aa--bb--cc
aa---bb---cc
aa----bb----cc
Output:
.
-
-.
--
aa.bb.cc (7 Replies)
Discussion started by: chitech
7 Replies
7. Shell Programming and Scripting
Hi All,
We are getting an external file in abc.csv format. When opened in excel spread sheet, it is opening alright. But when opened in notepad, I see the contents in a single line.
Ftp'd the file in binary mode to AIX UNIX host. When opened, I see Control M (^M) characters in place of New Line... (16 Replies)
Discussion started by: njny
16 Replies
8. UNIX for Dummies Questions & Answers
Hi Unix gurus,
I've a dna sequence in a file format known as fasta format (sequence header starts with > and ignored), an example shown below:
>sequence_1
CGTATTCTCCGAATACC
ATACG
>sequence_2
CAGATTTTCAAATACCCCC
In a file like this I want to do the following three search and replace. The... (4 Replies)
Discussion started by: Fahmida
4 Replies
9. Shell Programming and Scripting
This is for AIX 6.1, I've a flat file and the format is like this
DECLARE
some statements;
BEGIN
some statements;
END;
I've to search BEGIN and replace it with the following 4 lines
BEGIN
For x in 1..1
LOOP
BEGIN
Similarly I've to search END and replace it with the... (7 Replies)
Discussion started by: Mukul Sharma
7 Replies
10. Post Here to Contact Site Administrators and Moderators
In file, we have millions of records each of 1000 in length. And at specific position say 800 there is a space, we need to replace it with Character X if the ID in that row starts with 123.
So far i have used the below which is replacing space at that position to X but its not checking for... (3 Replies)
Discussion started by: Jagmeet Singh
3 Replies
LEARN ABOUT DEBIAN
ikiwiki-transition
ikiwiki-transition(1) General Commands Manual ikiwiki-transition(1)
NAME
ikiwiki-transition - transition ikiwiki pages to new syntaxes, etc
SYNOPSIS
ikiwiki-transition type ...
DESCRIPTION
ikiwiki-transition aids in converting wiki pages when there's a major change in ikiwiki syntax. It also handles other transitions not
involving wiki pages.
prefix_directives your.setup
The prefix_directives mode converts all pages from the old preprocessor directive syntax, requiring a space, to the new syntax, prefixed by
'!'.
Preprocessor directives which already use the new syntax will remain unchanged.
Note that if a page contains wiki links with spaces, which some older versions of ikiwiki accepted, the prefix_directives transition will
treat these as preprocessor directives and convert them.
setupformat your.setup
The setupformat mode converts a setup file from using a single wrappers block to using cgi_wrapper, git_wrapper, etc.
Note that all comments and any unusual stuff like perl code in the setup file will be lost, as it is entirely rewritten by the transition.
aggregateinternal your.setup
The aggregateinternal mode moves pages aggregated by the aggregate plugin so that the aggregateinternal option can be enabled.
moveprefs your.setup
Moves values that used to be admin preferences into the setup file.
Note that all comments and any unusual stuff like perl code in the setup file will be lost, as it is entirely rewritten by the move.
indexdb your.setup|srcdir
The indexdb mode handles converting a plain text .ikiwiki/index file to a binary .ikiwiki/indexdb. You do not normally need to run iki-
wiki-transition indexdb; ikiwiki will automatically run it as necessary.
hashpassword your.setup|srcdir
The hashpassword mode forces any plaintext passwords stored in the .ikiwiki/userdb file to be replaced with password hashes. (The
Authen::Passphrase perl module is needed to do this.)
If this is not done explicitly, a user's plaintext password will be automatically converted to a hash when a user logs in for the first
time after upgrade to ikiwiki 2.48.
deduplinks your.setup
In the past, bugs in ikiwiki have allowed duplicate link information to be stored in its indexdb. This mode removes such duplicate informa-
tion, which may speed up wikis afflicted by it. Note that rebuilding the wiki will have the same effect.
AUTHOR
Josh Triplett <josh@freedesktop.org>, Joey Hess <joey@ikiwiki.info>
ikiwiki-transition(1)