10-15-2012
the database is just a text file
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi group,
I want to replace the occurance of a particular text in a paragraph.I tried with Sed,but Sed only displays the result on the screen.How can i update the changes in the original file???
The solution should be a one liner using awk and sed.
Thanks in advance. (5 Replies)
Discussion started by: bishnu.bhatta
5 Replies
2. Shell Programming and Scripting
Execution of the following segment is giving the error -
Script extract:-
OUT=$DATADIR/sol_rsult_orphn.bcp
TMP1=${OUT}_tmp1
TMP=${OUT}_tmp
( isql -w 400 $dbConnect_OPR <<EOF
select convert(char(10), s.lead_id)
+'|'
+ s.pho_loc_type,
";",
s.sol_rsult_cmnt,
";",
+'|'+ s.del_ind... (3 Replies)
Discussion started by: kzmatam
3 Replies
3. Shell Programming and Scripting
Thanks for giving your time and effort to answer questions and helping newbies like me understand awk.
I have a huge file, millions of lines, so perl takes quite a bit of time, I'd like to convert these perl one liners to awk.
Basically I'd like all lines with ISA sandwiched between... (9 Replies)
Discussion started by: verge
9 Replies
4. Shell Programming and Scripting
sed awk one liner (2 Replies)
Discussion started by: jap2614
2 Replies
5. Shell Programming and Scripting
Hi, I'm writing a ksh script and trying to use an awk / sed / or perl one-liner to remove the last 4 characters of a line in a file if it begins with a period.
Here is the contents of the file... the column in which I want to remove the last 4 characters is the last column. ($6 in awk). I've... (10 Replies)
Discussion started by: right_coaster
10 Replies
6. Shell Programming and Scripting
hey everyone,
I want to remove some characters from a string that i have with sed. For example if my string is:
a0=bus a1=car a2=truck
I want my output to look like this:
bus car truck
So i want to delete the two characters before the = and including the =. This is what i came up with... (3 Replies)
Discussion started by: GmGeubt
3 Replies
7. UNIX for Dummies Questions & Answers
hi,
I have a directory "test" under which there are 3 files a.txt,b.txt and c.txt.
I need to rename those files to a.pl,b.pl and c.pl respectively.
is it possible to achieve this in a sed or awk one liner?
i have searched but many of them are scripts.
I need to do this in a one liner.
I... (2 Replies)
Discussion started by: pandeesh
2 Replies
8. UNIX for Dummies Questions & Answers
I have an array containing bunch of characters. I have to check this array for specific character and if "Not Found than" use a goto statement to go to USAGE
set options = (A B C D E F)
@ i = 0
while ($i <= ${#options})
if ($options != "F" || $options != "D") then
goto USAGE
endif
@... (1 Reply)
Discussion started by: dixits
1 Replies
9. Shell Programming and Scripting
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
Discussion started by: shell_boy23
6 Replies
10. UNIX for Dummies Questions & Answers
I have a data base of part numbers:
AAA Thing1
BBB Thing2
CCC Thing3
File one is a list of part numbers:
AAA234
BBB678
CCC2345
Is there a sed one-line that would compare a data base with and replace the part numbers so that the output looks like this?
AAA234 Thing1
BBB678 Thing2... (5 Replies)
Discussion started by: jimmyf
5 Replies
LEARN ABOUT REDHAT
makedbz
MAKEDBZ(8) System Manager's Manual MAKEDBZ(8)
NAME
makedbz - rebuild dbz files
SYNOPSIS
makedbz [ -f filename ] [ -i ] [ -o ] [ -s size ]
DESCRIPTION
Makedbz rebuilds dbz(3) database. The default name of the text file is <pathdb in inn.conf>/history; to specify a different name, use the
``-f'' flag.
OPTIONS
-f If the ``-f'' flag is used, then the database files are named file.dir , file.index and file.hash. If the ``-f'' flag is not used,
then a temporary link to the name history.n is made and the database files are written as history.n.index , history.n.hash and his-
tory.n.dir.
-i To ignore the old database use the ``-i'' flag. Using the ``-o'' or ``-s'' flag implies the ``-i'' flag.
-o If the ``-o'' flag is used, then the link is not made and any existing history files are overwritten. If the old database exists,
makedbz will use it to determine the size of the new database.
-s The program will also ignore any old database if the ``-s'' flag is used to specify the approximate number of entries in the new
database. Accurately specifying the size is an optimization that will create a more efficient database. (The size should be the
estimated eventual size of the file, typically the size of the old file.) For more information, see the discussion of dbzfresh and
dbzsize in dbz(3).
HISTORY
Written by Katsuhiro Kondou <kondou@nec.co.jp> for InterNetNews. This is revision 1.1, dated 1999/08/27.
SEE ALSO
dbz(3), history(5), inn.conf(5).
MAKEDBZ(8)