I am using awk and it stops when it encounter line greater then 3000 character. Is there any command which will help me remove line greater then 3000 characters. (10 Replies)
Can I find wether a particular file exist and size greater than zero in one line command.
similar to this
if &&
something in one if test .... e.g. if
1.) is it possible ? ... if yes how
2.) what would be the return type in case there is success or failure. I mean if both are... (4 Replies)
i have a file
a.txt
12345,20
34567,10
23123,50
123456,45
how to find lines which hav 2nd entry greater than 40
o/p
23123,50
123456,45
pls help to get o/p (5 Replies)
I have a file which has a list of titles and then 14 lines afterwards. I need to find the 1 through 14 lines which are greater than 15k and print the title and the line which matched.
Sample before:
ABC.CDE.NORTH.NET
1:18427
2:302
3:15559
4:105
5:5
6:2
7:2
8:2
9:4
10:2
11:17
12:2... (3 Replies)
i have a file in following format
1 32 3
4 6 4
4 45 1
45 4 61
54 66 4
5 65 51
56 65 1
12 32 85
now here the total number of lines are 8(they vary each time)
Now i want to select only those lines in which the values... (6 Replies)
Hi,
I have a big file say abc.csv. And in that file, I need to find lines whose length is less than 50 characters. How can it be achieved? Thanks in advance.
Thanks (4 Replies)
I have a file with 22 lines. Each line has only 5 different chars, no white space, and each line is 3,278,824 in length. The 5 chars is "-", "A", "B", "C", "D".
Below is an example of the first 25 chars of the first four lines of the file.
-----ABCDA--CD-BBBBB----D
--A--ABCD--DCD-BBBBC-----... (12 Replies)
Hi,
I have a file which contains many lines. Some of them are longer than 50 chars. I want to break those lines but I don't want to break words, e.g. the file
This is an exemplary text which should be broken aaaaaa bbbbb ccccc
This is the second line
This line should also be broken... (3 Replies)
I have a file where every line includes four expressions with a caret in the middle (plus some other "words" or fields, always separated by spaces). I would like to extract from this file, all those lines such that each of the four expressions containing a caret appears in at least four different... (9 Replies)
Discussion started by: uncleMonty
9 Replies
LEARN ABOUT OSF1
look
look(1) General Commands Manual look(1)NAME
look - Finds lines in a sorted list
SYNOPSIS
look [-df] [-tcharacter] string [file]
The look command prints all lines in a sorted file that begin with string.
OPTIONS
Uses dictionary order; only letters, digits, tabs, and spaces are used in comparisons. Searches without regard to case; treats uppercase
and lowercase as equivalent. Ignores character and characters following it in the search string. If you specify look -tC ABCDE, the
string ABCDE would become (in effect) AB, with CDE being ignored. This option is primarily for shell scripts, in which more than one
string is being processed.
DESCRIPTION
If no file is specified, look searches in the system word list /usr/share/dict/words, with the options -df assumed by default.
The look command uses binary search.
The -d and -f options affect comparisons as in sort.
NOTES
In order to use the -f option, you must first sort file with the sort -f command; otherwise, look displays only lowercase items.
If you do not specify -f, but specify a file (such as /usr/share/dict/words) that has been sorted with sort -f, look may not produce any
output.
EXAMPLES
To search a sorted file called sortfile for all lines that begin with the string as, enter: look as sortfile To search the system word list
for all words beginning with smi, enter: look smi
This might result in: smile smirk smith smithereens Smithfield Smithson smithy smitten
FILES
System word list.
SEE ALSO
Commands: grep(1), sort(1), spell(1)look(1)