If your awk has the toupper function, you can use that to do case-insensitive comparisons.
This creates an uppercase version of the input line, and compares that against the regular expressions. (I suppose it would be more economical to only invoke toupper once. If this is a time-critical operation, we can look at that.)
Hi. First post here.
I'm relatively new to UNIX (Solaris8) and writing my first real script, but I seem to have hit a brick wall. The odd thing is that it seems like it should be a simple task....but not with UNIX apparently.
I've got a large text file: 14000 lines with 10 columns.
I want... (2 Replies)
Hi All,
as you can see I'm pretty new to this board. :D
I'm struggling around with small script to search a few fields in another file.
Basically I have file1 looking like this:
15:38:28 sz:10001 pr:14.16
15:38:28 sz:10002 pr:18.41
15:38:29 sz:10003 pr:19.28
15:38:30 sz:10004... (1 Reply)
Dear unix gurus,
I have a data file with header information about a subject and also 3 columns of n rows of data on various items he owns. The data file looks something like this:
adam peter
blah blah blah
blah blah blah
car
01 30 200
02 31 400
03 57 121
.. .. ..
.. .. ..
n y... (8 Replies)
Hi All,
I have to search in multiple columns for multiple values, if the match is found then print the values as below.
Eg:
cat t1
Z|VLD_AB_P|VLD_CD_P|VLD_EF_F|VLD_GH_F|100
Y|VLD_AB_F|VLD_CD_F|VLD_EF_P|VLD_GH_P|101
if then print "Invalid AB in $6"
if then print "Invalid CD in... (6 Replies)
Hello,
I'm trying to compare multiple columns between two files. I would like to use columns 1,2 from file1 and search file2 in columns 2,3 for any matches. If they match, then print columns 2,3 from file2.
file1
11:22:33:44:55:66|2010-07-25 12:30|xyz
22:22:22:22:22:22|2010-07-25... (5 Replies)
Hi,
I am unable to search the duplicates in a file based on the 1st,2nd,4th,5th columns in a file and also remove the duplicates in the same file.
Source filename: Filename.csv
"1","ccc","information","5000","temp","concept","new"
"1","ddd","information","6000","temp","concept","new"... (2 Replies)
hello all.
I would like to kindly ask you, if you could help me out with one problem.
I have two files -> for ex. file1 and file2
file1 contains only various numbers
file 2 contains multiple columns with various values
What i need is to take every single number, one by one, from file 1 and... (3 Replies)
If I am searching for AA then then BB in a loop, how do I make the output always contain 6 columns of comma separated data even when there may only be 4 search matches?
AA11
AA12
AA13
AA14
BB11
BB12
BB13
BB14
BB15
BB16
Final output:
AA11,AA12,AA13,AA14,,,... (14 Replies)
This helped get me started.
https://www.unix.com/unix-for-dummies-questions-and-answers/157026-need-command-search-numbers-greater-than-3000-a.html
This is the command I am using. I am trying to find numbers greater than 70 in column 5. I do not know if it is getting confused because there... (6 Replies)
Discussion started by: cokedude
6 Replies
LEARN ABOUT OPENSOLARIS
search
search.h(3HEAD) Headers search.h(3HEAD)NAME
search.h, search - search tables
SYNOPSIS
#include <search.h>
DESCRIPTION
The <search.h> header defines the ENTRY type for structure entry, which includes the following members:
char *key
void *data
and defines ACTION and VISIT as enumeration data types through type definitions as follows:
enum { FIND, ENTER } ACTION;
enum { preorder, postorder, endorder, leaf } VISIT;
The size_t type is defined as described in <sys/types.h>. See types.h(3HEAD).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO hsearch(3C), insque(3C), lsearch(3C), tsearch(3C), types.h(3HEAD), attributes(5), standards(5)SunOS 5.11 10 Sep 2004 search.h(3HEAD)