New to sed...
Have a file foo.txt (below).
Need to replace text on 2 lines, but can only feed sed the first few characters of each line (all lines are unique).
So, in my example, I have put '$' in place of what I need to figure out how to feed the whole line.
What I have thus far:
sed -e... (6 Replies)
Hi,
I am looking for any script which can do the following.
have to read a pattern from fileA and copy it to fileB.
fileA:
...
...
Header
...
...
..p1
...
...
fileB:
....
....
Header (3 Replies)
I have a pattern
username:x:32005:32006::/usr/local/user:/bin/bash
I need to match the line containing username and replace /bin/bash with /usr/local/my/bin/noshell
So it becomes
username:x:32005:32006::/usr/local/user:/usr/local/my/bin/noshell (7 Replies)
I have a file with multiple lines like this:
<junk><PATTERN><junk><PATTERN><junk>
<junk><PATTERN><junk><PATTERN><junk><PATTERN><junk>
Note that
1. There might be variable number occurrences of PATTERN in a line.
2. <> are just placeholders, they do not form part of the pattern.
I need... (4 Replies)
Hi How Are you?
I am doing fine!
I need to go now?
I will see you tomorrow!
Basically I need to replace the entire line containing "doing" with a blank line:
I need to the following output:
Hi How Are you?
I need to go now?
I will see you tomorrow!
Thanks in advance.... (1 Reply)
Sed replace using same pattern repeating multiple times in a line
I have text like below in a file:
I am trying to replace the above line to following
How can I acheive this?
I am able to do it if the occurrence is for 1 time:
But If I try like below
I am getting like this:
I have to... (4 Replies)
awk , sed Experts,
I want to remove first and last line after pattern match "vg" :
I am trying : # sed '1d;$d' works fine , but where the last line is not having vg entry it is deleting one line of data.
- So it should check for the pattern vg if present , then it should delete the line ,... (5 Replies)
Im using the command below , but thats not the output that i want. it only prints the odd and even numbers.
awk '{if(NR%2){print $0 > "1"}else{print $0 > "2"}}'
Im hoping for something like this
file1:
Text hi this is just a test
text1 text2 text3 text4 text5 text6
Text hi... (2 Replies)
I am trying to combine lines with these conditions:
1. First line starts with text of "libname VALUE db2 datasrc" where VALUE can be any text.
2. If condition1 is met then continue to combine lines through a line that ends with a semicolon.
3. Ignore case when matching patterns and remove any... (5 Replies)
Discussion started by: Wes Kem
5 Replies
LEARN ABOUT CENTOS
ibus-table-createdb
IBUS-TABLE-CREATEDB(1)IBUS-TABLE-CREATEDB(1)NAME
ibus-table-createdb - create ibus-table database from table source
SYNOPSIS
ibus-table-createdb [ [ -n name ] [ --name name ] ] [ [ -s source ] [ --source source ] ] [ [ -e extra ] [ --extra extra ] ] [
[ -p pinyin ] [ --pinyin pinyin ] ] [ -o ] [ --no-create-index ] [ -i ] [ --create-index-only ] [ -d ] [ --debug ]
DESCRIPTION
ibus-table-createdb creates a database for ibus-table from a source table.
OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included
below.
-n database-file specifies the file name for the binary database for the IME. The default is ''. If the file name of the database is
not specified, the file name of the source file before the first '.' will be appended with '.db' and that will be used as the file
name of the database.
-s source-file specifies the file which contains the source of the IME. The default is ''.
-e extra-words-file specifies the file name for the extra words for the IME. The default is ''.
-p pinyin-file specifies the source file for the pinyin. The default is '/usr/share/ibus-table/data/pinyin_table.txt.bz2'.
-o Do not create an index for a database (Only for distribution purposes, a normal user should not use this flag!)
-i Only create an index for an existing database. Specifying the file name of the binary database with the -n or --name option is
required when this option is used.
-d Print extra debug messages.
EXAMPLES
ibus-table-createdb -n ipa-x-sampa.db -s ipa-x-sampa.txt
Create the binary database ``ipa-x-sampa.db'' from the source file ``ipa-x-sampa.txt''.
ibus-table-createdb -i -n ipa-x-sampa.db
Create an index for the database ``ipa-x-sampa.db''.
AUTHOR
This manual page was written by Mike FABIAN <mfabian@redhat.com>.
Apr 18, 2013 IBUS-TABLE-CREATEDB(1)