03-10-2009
add a word in the middle
I have a file where in I need to add gctunit1/gtdivcompebb1/ after the = sign
for example:
gtfix31/gctunit_gtdivcompebb1/csclkswcompbypassstepgnnnh[4] = gctunit1/gtdivcompebb1/csclkswcompbypassstepgnnnh
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to add a new lines with certain data, to an existing file, every 5 lines in the file.
There is no way to find any distinct charater pattern so
I will have to do a line count and then insert the new line.
I think using awk or sed is what I need to do.
Any help is appreciated.
Kunder (2 Replies)
Discussion started by: kunder
2 Replies
2. Shell Programming and Scripting
Hi,
I have tried many times to add the string into the first line of the file or the middle of the file but could not find the solution.
I first tried by
$echo "paki" >> file
This code only append paki string at the end of file "file" but how can i add this "paki" into the first line or... (5 Replies)
Discussion started by: ali hussain
5 Replies
3. Shell Programming and Scripting
i want to add a string in a very top of a file without using VI or SED or AWK
this is what ive done:
(echo '0a'; echo 'LINE OF TEXT'; echo '.'; echo 'wq') | ed -s myfile
to add astrng right in the middle i could have count the lines of the file and just chenge the address.
... (6 Replies)
Discussion started by: ciroredz
6 Replies
4. Shell Programming and Scripting
Can anyone help me pls? I want to add a text into the middle of file.
I've writtenthe following script
text to add="$1"
file="$2"
lines=$(wc -l $2)
half_lines=$(expr $lines / 2)
head -$half_lines $2 > temp
echo "text to add" >> temp
((half_lines=$half_lines + 1))
tail -$half_lines $2... (6 Replies)
Discussion started by: relle
6 Replies
5. Shell Programming and Scripting
I've got a configuration file that is filled with xml text statements for example:
<...../>
<...../>
<...../>
<data id="java-options" value="-server -Djava.security.policy..../>
<...../>
<...../>
<...../>
I want to write a korn shell script that will go to this specific line and add a... (2 Replies)
Discussion started by: progkcp
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I want to write a script that takes a file and a string as params and adds the string to the middle line of the file. Also, I want to output the results back to the original file passed without using temp files.
I am very much new to UNIX so this is all a little like black magic to me at... (15 Replies)
Discussion started by: Chiefos
15 Replies
7. Shell Programming and Scripting
How can
grep G.*schema
give me the result: ${Gacntg_dt}""'"'
doesn't G.*schema say give me an unlimited number of characters between G and schema?
:confused: (3 Replies)
Discussion started by: danmauer
3 Replies
8. UNIX for Dummies Questions & Answers
How would I print the word "and" between the words "FOO" and BAR" using sed? My file has three words in it FOO and BAR. I only want the word "and".
Thanks every one. (7 Replies)
Discussion started by: tigta09
7 Replies
9. Shell Programming and Scripting
Hi,
I'm currently working on a shell script to automate a backup check on oracle database. My requirement is to grep the words between two delimiters and pass on to a variable..
for ex I have following values in my log file...
(DB_NAME), (163.24 25), (16/02/10 23:40), (COMPLETED),
I want... (5 Replies)
Discussion started by: senthil3d
5 Replies
10. UNIX for Dummies Questions & Answers
This could be a really dummy question.
I have a log text file.
What unix command to extract line from specific string to another specific string.
Is it something similar to?:
more +/"string" file_name
Thanks (4 Replies)
Discussion started by: aku
4 Replies
LEARN ABOUT DEBIAN
pofilespell
POFILESPELL(1) POFILESPELL(1)
NAME
POFileSpell - checks the spelling in a collection of PO files
SYNOPSIS
POFileSpell [OPTION] [...] [FILE] [...]
INTRODUCTION
POFileSpell checks the spelling in a collection of PO files.
COMMAND LINE OPTIONS
--help or -h
show usage instructions
--interactive or -i
interactive mode, iterate through the spelling errors using a text mode interface; see the Interactive Mode section
--overview or -o
generate an overview file, grouping by error and not by file
--dict=file or -d file
load a file with a list of words to consider correct; can be used multiple times
--batch-add=file
load a file with a list of words to add to the X-POFile-SpellExtra section of each of the target PO files; can be used multiple
times; when used, the actual spelling process is not run
--command=command
the command used for actually spell checking the text, by default aspell --encoding=utf-8 -l; if you want to use ispell, try
something like --comand="ispell -l" or --comand="iconv -t iso-8859-1 | ispell -l"
INTERACTIVE MODE
In interactive mode you iterate through each of the errors found. In each prompt you can press a to add the word to a file's
X-POFile-SpellExtra entry, n to ignore all further errors from this file, Enter to ignore this error or, if you are using one or more
dictionary files, the number of the file (1, 2, ...) to add the word to that dictionary file.
PO FILE HEADER DIRECTIVES
POFileSpell recognizes one PO file header directive. As with all gettext lint tools, this directive is prefixed with X-POFile.
X-POFile-SpellExtra: word
adds the word to the file's list of accepted words
DICTIONARY FILE FORMAT
Dictionary files are just lists of words, one on each line. For example:
word 1
word 2
word n
MORE INFORMATION
gettext-lint web page: http://gettext-lint.sourceforge.net/
AUTHOR
Pedro Morais.
<morais@kde.org>
08/16/2006 POFILESPELL(1)