Using the script: (Called replaceit)
#!/bin/ksh
String=$1
Replace=$2
sed -e "s/${orig}/${new}/g" oldfile.txt > newfile.txt
In oldfile.txt, I'm looking for: getenv("Work")
And change it To: /u/web
I execute the script:
replaceit "getenv(\""Work\"")" /u/web
I'm getting sed... (3 Replies)
how to escape / (forward slash) in a string.
I have following scnerio:
sed s/${var1}{$var2}
var1 and var2 both contain slashes, but sed gives error if there is a slash in var1 or var2. sed is used here to replace var1 with var2.
Thanks in advance (1 Reply)
Hi all,
I need to know way of inserting backward slash before forward slash. My problem is that i need to supply directory path as an argument while invoking cshell script. This argument is further used in script (i.e. sed is used to insert this path in some file). So i need to place \ in front... (2 Replies)
What is the significance of the forward slash(/) while specifying a directory?
cp -av /dir/ /opt/
and
cp -av /dir /opt
Does effectively the same job it seems? (2 Replies)
i need to replace '/' forward slash with \/(backward slash follwed by a forward slash) using sed command when the forward slash occurs as a first character in a file..
Tried something like this but doesn't seem to work.
find $1 -print0 | xargs -0 sed -i -e 's/^\//\\\//g'
Can someone... (19 Replies)
I want to replace every 2nd occurance of a string/character from a line.
ababacbsbddbsbbcbdbssb
i want to replace every s2nd b with @ like below
should be like
aba@acbs@ddbs@bc@dbss@ (3 Replies)
hi
hope somebody can help, there seems to be bit on the net about this, but still cant make it work the way i need.
i have a file live this
mm dd ff /dev/name1
mm dd ff /dev/name2
mm dd ff /dev/name3
mm dd ff /dev/name4
i need to update /dev/name1 etc to /newdev/new/name1 etc
so... (5 Replies)
./split2.sh: line 1: split/ssl/pop3s.txt: No such file or directory
sort: cannot read: split/ssl/pop3s.txt: No such file or directory
Hi there,
I am pulling data from the following source:
ssl/http
ssl/http
ssl/http-alt
ssl/https
ssl/https
ssl/https
ssl/https
ssl/https
ssl/https... (3 Replies)
Discussion started by: alvinoo
3 Replies
LEARN ABOUT DEBIAN
odidx
ODIDX(1) Quick Database Manager ODIDX(1)NAME
odidx - indexer of document files
SYNOPSIS
odidx register [-l file] [-wmax num] [-tsuf sufs] [-hsuf sufs] name[dir]
odidx relate name
odidx purge name
DESCRIPTION
This manual page documents briefly the odidx commands.
The command odidx is a utility for indexing files on the local file system. This command is useful for a full-text search system of a Web
site. Supported file format are plain text and HTML. Supported character encoding are US-ASCII and ISO-8859-1. The URI of each document is
specified with the path of its file. Attributes named as title and date are given to each documents. When a document is already existing in
the database, it is registered if its last modification time is newer, or it is ignored. Modification times are stored in the sub database
`_mtime' in the main database directory. Score information are stored in the sub database `_score' in the main database directory. This
command is used in the above format. name specifies a database name. dir specifies a directory name.
OPTIONS
A summary of options is included below. For a complete description, see the file:///usr/share/doc/qdbm-doc/spex.html#odeumcli.
-l file
read a file and get list of paths of files to register. If `-' is specified, the standard input is read.
-wmax num
specify the max number of words to be stored in the document database.
-tsuf sufs
specify suffixes of plain text files in comma separated format. The default is `-tsuf .txt,.text'.
-hsuf sufs
specify suffixes of HTML files in comma separated format. The default is `-hsuf .html,.htm'.
EXAMPLES
For example, to register files which are under `/home/mikio' and whose suffix are `.txt', `.c', or `.h', perform the following command.
odidx register -tsuf ".txt,.c,.h" -hsuf "" casket /home/mikio
Thus, to retrieve documents which include `unix' and `posix' and show the top 8 terms, perform the following command.
odmgr search -max 8 -h casket "unix posix"
SEE ALSO qdbm(3), odmgr(1), odeum(3), odopen(3).
AUTHOR
QDBM was written by Mikio Hirabayashi <mikio@fallabs.com>.
This manual page was written by Fumitoshi UKAI <ukai@debian.or.jp>, for the Debian project (but may be used by others).
Man Page 2005-05-23 ODIDX(1)