06-26-2007
How to replace the string in unix file?
Hi
Am getting "Line too long" error in opening a file using vi editor but it is opening using cat.
How can i edit the file to replace some string in it.
Thanks
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
i call my shell like:
my_shell "my project name"
my script:
#!/bin/bash -vx
projectname=$1
sed s/'PROJECT_NAME ='/'PROJECT_NAME = '$projectname/ <test_config_doxy >temp
cp temp test_config_doxy
the following error occurres:
sed s/'PROJECT_NAME ... (2 Replies)
Discussion started by: vivelafete
2 Replies
2. Shell Programming and Scripting
Search and Replace a string pattern with empty in an xml file in unix:
My xml file would be like this :
<Accounts><Name>Harish</Name><mobile>90844444444444445999 </mobile><TRIG>srcujim-1</TRIG></Accounts><Accounts><Name>Satish</Name><mobile>908999</mobile><TRIG>ettertrtt-1</TRIG></Accounts>
... (1 Reply)
Discussion started by: harish_s_ampeo
1 Replies
3. Shell Programming and Scripting
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
Discussion started by: tuathan
5 Replies
4. Shell Programming and Scripting
Can someone tell me how I can do this?
e.g:
a=$(echo -e wert trewt ertert ertert ertert erttert
erterte
rterter
tertertert
ert)
How do i replace the STRING with $a?
I try this:
sed -i 's/STRING/'"$a"'/g' filename.ext
but this don' t work (2 Replies)
Discussion started by: jforce
2 Replies
5. UNIX for Dummies Questions & Answers
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies
6. Shell Programming and Scripting
Sorry for the long/weird title but I'm stuck on a problem I have. I have this XML file:
</member>
<member>
<name>TransactionID</name>
<value><string>123456789123456</string></value>
</member>
<member>
<name>Number</name>
... (9 Replies)
Discussion started by: cozzin
9 Replies
7. UNIX for Beginners Questions & Answers
My sample file is variable length, with out any field delimiters. It has min of 18 chars length and the 'CRLF' is potentially between 12-14 chars. How do I replace this with a space? I still want to keep end of record, but just want to remove these new lines chars in the middle of the data.
... (7 Replies)
Discussion started by: chandrath
7 Replies
8. Shell Programming and Scripting
I have a file comp.pkglist which mention package version and release . In 'version change' and 'release change' line there are two versions 'old' and 'new' Version Change: --> Release Change: -->
cat comp.pkglist
Package list: nss-util-devel-3.28.4-1.el6_9.x86_64
Version Change: 3.28.4 -->... (1 Reply)
Discussion started by: Paras Pandey
1 Replies
9. UNIX for Beginners Questions & Answers
I have the below string which i need to compare with a file and replace this string in the file which matches closely. Can anyone help me on this.
string(Scenario 1)- user::r--,user::ourfrd:r--
String(Scenario 2)- user::r--
File
****
# file: /local/Desktop/myfile
# owner: me
# group:... (6 Replies)
Discussion started by: sarathy_a35
6 Replies
LEARN ABOUT DEBIAN
katoob
KATOOB(1) General Commands Manual KATOOB(1)
NAME
katoob - A Gtk2 light weight multilingual BiDi aware text editor.
katoob is a text editor for X, You can use it to create and edit text files. Katoob support reading and saving text files in many encod-
ings. As well as importing / exporting to HTML character reference.
SYNOPSIS
katoob [options] files...
DESCRIPTION
This manual page documents briefly the katoob commands.
katoob is a light weight, multi lingual, BiDi aware text editor. It supports opening and saving files in multiple encodings. The main sup-
port was for Arabic language but more languages are currently supported.
OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included
below.
-h, --help
Show summary of options.
-v, --version
Show version of program.
-u, --usage
Display brief usage message.
- Read input from the standard input.
files...
Specifies the files to be opened. Multiple files are supported but they should be separated by spaces, Reading from pipes is also
supported by using a dash "-". If no files specified, Katoob'll start with an empty document.
FILES
$HOME/.katoob/
User's configuration files directory
$HOME/.katoob/config
Main configuration file
$HOME/.katoob/recent
Recent files list
$PREFIX/share/katoob
Global program directory
EXAMPLES
Opening multiple files:
katoob foo.txt bar.text zot
Opening a file called foo and the output of cat:
cat bar | katoob foo -
Reading from a pipe:
ls | katoob -
Reading from multiple pipes:
katoob - -
Here katoob'll try to read from the standard input 2 times. To close the standard input you should press CTRL-D For each dash passed,
Katoob'll reopen the standard input and read from it.
BUGS
Something like cat foo | katoob - - "should read cat output and then wait for the user input and open each one in a separate document" is
not supported.
AUTHOR
katoob was written by Mohammed Sameer.
BUGS
Bugs should be reported at http://bugzilla.arabeyes.org/ or the Arabeyes.org developer mailing list developer@arabeyes.org.
June 22, 2003 KATOOB(1)