Dear All,
To find the length of the longest line from a file i have used wc -L which is giving the proper output...
But the problem is AIX os does not support wc -L command.
so is there any other way 2 to find out the length of the longest line using awk or sed ?
Regards,
Pankaj (1 Reply)
Hi Everyone,
I am trying to write a shell script that can find the longest phrase that appears at least twice in an online news article. The HTML has been parsed through an HTML parser, converted to XML and the article content extracted. I have put this article content in a text file to work... (24 Replies)
Good Morning/Afternoon All,
I am using the nawk utility in korn shell to find the longest field and display that result.
My Data is as follows:
The cat ran
The elephant ran
Milly ran too
We all ran
I have tried nawk '{ if (length($1) > len) len=length($1); print $1}' filename
The... (5 Replies)
Hello all,
I need to find the longest string in a select field and print that field.
I have tried a few different methods and I always end up one step from where I need to be.
Methods thus far:
nawk '{if (length($1) > long) long=length($1); if(length($1)==long) print $1}'
The above... (6 Replies)
I am writing a bash script to find out all the files in a directory which are empty. I am running into multiple issues. I will really appreciate if someone can please help me.
#!/bin/bash
DATE=$(date +%m%d%y)
TIME=$(date +%H%M)
DIR="/home/statsetl/input/civil/test"
... (1 Reply)
Running below line gives 3957 as length of longest line in file 20121119_SRMNotes_init.dat
awk ' { if ( length > 3950 ) { x = length } }END{ print x }' 20121119_SRMNotes_init.dat
While wc -L 20121119_SRMNotes_init.dat gives output as 4329. Why is there a difference between these two commands.... (2 Replies)
I want to find common line in two files and replace the next line of first file with the next line of second file. (sed,awk,perl,bash any solution is welcomed ) Case Ignored. Multiple Occurrence of same line.
File 1:
hgacdavd
sndm,ACNMSDC
msgid "Rome"
msgstr ""
kgcksdcgfkdsb... (4 Replies)
Hi ,
i have a file with data as below.This is same file. But actual file contains to many rows.
i want to search for a string "Field 039 00" and delete that line and previous 3 lines in that file.. Can some body suggested me how can i do using either sed or awk command ?
Field 004... (7 Replies)
I am trying to make my script as simple as a possible but, I am not sure if the way I am approaching is necessarily the most efficient or effective it can be. What I am mainly trying to fix is a for loop to remove a string from the specified files and within this loop I am trying to copy the lines... (2 Replies)
Hello,
I have some code that works more or less. This is called by a make file to adjust some hard-coded definitions in the src code. The script generated some values by looking at some of the src files and then writes those values to specific locations in other files. The awk code is used to... (3 Replies)
Discussion started by: LMHmedchem
3 Replies
LEARN ABOUT ULTRIX
indxbib
lookbib(1) General Commands Manual lookbib(1)Name
indxbib, lookbib - build inverted index for a bibliography, lookup bibliographic references
Syntax
indxbib database...
lookbib database
Description
The makes an inverted index to the named databases (or files) for use by and These files contain bibliographic references (or other kinds
of information) separated by blank lines.
A bibliographic reference is a set of lines, constituting fields of bibliographic information. Each field starts on a line beginning with
a ``%'', followed by a key-letter, then a blank, and finally the contents of the field, which may continue until the next line starting
with ``%''.
The command is a shell script that calls and The first program, truncates words to 6 characters, and maps upper case to lower case. It
also discards words shorter than 3 characters, words among the 100 most common English words, and numbers (dates) < 1900 or > 2000. These
parameters can be changed. The second program, inv, creates an entry file (.ia), a posting file (.ib), and a tag file (.ic), all in the
working directory.
The command uses an inverted index made by to find sets of bibliographic references. It reads keywords typed after the ``>'' prompt on the
terminal, and retrieves records containing all these keywords. If nothing matches, nothing is returned except another ``>'' prompt.
It is possible to search multiple databases, as long as they have a common index made by In that case, only the first argument given to is
specified to
If does not find the index files (the .i[abc] files), it looks for a reference file with the same name as the argument, without the suf-
fixes. It creates a file with a '.ig' suffix, suitable for use with It then uses this fgrep file to find references. This method is sim-
pler to use, but the .ig file is slower to use than the .i[abc] files, and does not allow the use of multiple reference files.
Files
x.ia, x.ib, x.ic, where x is the first argument, or if these are not present, then x.ig, x
See Alsoaddbib(1), lookbib(1), refer(1), roffbib(1), sortbib(1),
lookbib(1)