i have ids repeated with alias names starting with different patterns like 'ab' , 'fg' etc...sometimes the same pattern names are repeated with the same ids like id=1 has names ab1 as well as ab3.
Lookup.txt
Given a list of names
List.txt
and a starting pattern , say 'ab' ... I would like to return the corresponding alias names (of the same id) , if available ..
I am looking for script, lookup.sh or awk or pl which when passed parameters
in this case
will return the pattern name , where available. In case where the id has multiple ab names, any one can be returned.
Because there is no name in lookup.txt with the abbreviation ab (ab1, ab3, ab2, or ab4) that has the same id as the id for nameer3 (4).
I have a working awk script for this problem, but I'm waiting for the submitter to explain what has been tried (to show that we aren't just being used as an unpaid programming staff).
Wide range for interpretation, no? I'd read this to suppress names not starting with "ab" ... but I'm no native speaker.
Hi Rudi,
There is also the later statement in post #1:
Quote:
In case where the id has multiple ab names, any one can be returned.
that at least reduced the range of interpretations that fit the requirements. The way I interpreted it fit the output that was requested, but I agree that without the sample output I could interpret the requirements differently.
Anyway, i'm going to bed now; it is way past my bedtime...
I have an application(Minecraft Server) that generates a logfile live. Using Crontab and screen I send a 'list' command every minute.
Sample Log view:
2013-06-07 19:14:37 <Willrocksyea1> hello*
2013-06-07 19:14:41 <Gromden29> hey
2013-06-07 19:14:42 Gromden29 lost connection:... (1 Reply)
Hello all,
after spending hours of searching the web I decided to create an account here. This is my first post and I hope one of the experts can help.
I need to resolve a grep / sed / xargs / awk problem.
My input file is just like this:
----------------------------------... (6 Replies)
I'd like to create an alias that displays my string but leaves my cursor at the end.
Not seeing any examples of this.
One indirect way might be to preload or stuff the history buffer, so I just hit up arrow. (2 Replies)
Hello
I'm new to Solaris
I have a file have things like these
PATTERN12345678
PATTERN12345678PATTERN87654321
PATTERN12345678 PATTERN87654321
i hope i could change to this format
PATTERN12345678
PATTERN12345678
PATTERN87654321
PATTERN12345678
PATTERN87654321 (4 Replies)
Hi
I want to search for a specific pattern in file
Say
ABC;HELLO_UNIX_WORLD;PQR
ABC;HELLO_UNIX_WORLD_IS_NOT_ENOUGH;XYZ
ABC;HELLO_UNIX_FORUM;LMN
Pattern to search is : "HELLO_UNIX_*****" and not "HELLO_UNIX_***_***_"
I mean after "HELLO_UNIX" there can only be one word.In this case... (2 Replies)
Hi,
I need to search a file, in each line I need to check for occurance of '1' from a particular position through the next 32 bytes. If 1 is found, i need to return the position. Here is an example of the file and the output i need. Please help. I'm new to perl and unix.
File:
... (1 Reply)
Hi,
Need some idea on file processing, I have file like below,
Processing al sources ...
...No value found :
CHECK.
Completed comparing all sources.
Comparing schedulers...
Processing al targets ...
...No value found :
From above I need to extract the line where "No value... (4 Replies)
I would like to write a script which will read a file containing a list of filenames of the format as shown below :
/usr/local/packages/runcmdlinetool
/home/john.doe/sdfsdf/sdfsdfsd/sdfsdf/sdfsdfTemplates.xml
/usr/local/bin/gtar... (4 Replies)