## Extract Uniq prefix from a start and end prefix

Extract Uniq prefix from a start and end prefix
# 1
12-16-2016
Extract Uniq prefix from a start and end prefix

Dear All,

assume i have a file with content:
the output is:
how should we use any awk, sed, perl can do this task, means to extract the uniq prefixes from the start and stop prefix.

Thanks
Jimmy

Last edited by Don Cragun; 12-16-2016 at 07:33 PM.. Reason: Add CODE and ICODE tags.
 jimmy_y View Public Profile for jimmy_y Find all posts by jimmy_y
# 2
12-16-2016
 Aia View Public Profile for Aia Find all posts by Aia
# 3
12-16-2016
Quote:
Originally Posted by Aia
Hi Aia,

Thanks, after run your cmd, the output will be
but the output should be

Last edited by Don Cragun; 12-16-2016 at 07:45 PM.. Reason: Add CODE tags.
 jimmy_y View Public Profile for jimmy_y Find all posts by jimmy_y
# 4
12-16-2016
Please explain the logic by which that output is supposed to be produced. I don't see any pattern in taking a starting number and sometimes adding 1000 to it, sometimes adding 100 to it, and sometimes adding 199 to it to reach a stopping number???
 Don Cragun View Public Profile for Don Cragun Find all posts by Don Cragun

Test Your Knowledge in Computers #925
Difficulty: Medium
The earliest versions of Unix time had a 32-bit integer incrementing at a rate of 60 Hz.
True or False?

## What prefix backslash does to command

In unix when I run rm command, it asks for file removal confirmation e.g. rm netmail_log.csv rm: remove netmail_log.csv (yes/no)? n But if i prefix backslash to rm it does not ask for confirmation. Does anyone know what backslash does to command or shell ? e.g. \rm netmail_log.csv

## Extract date from file header and prefix it to all lines

Hello All, I have a file in the following format. I want to extract the date(020090930, 020090929) in the string "STPAGE020090930" and "STPAGE020090929" and prefix it to all lines below them. The output must be put into a new file. STPAGE020090930 xyzz aalc...

## --prefix question

OK, now I just feel plain silly asking this. But I am very much a beginner at compiling and installing Unix software, so... When setting the prefix, do you also have to specify the directory the files reside in? For example, lets say I am installing cURL in /usr/local Would I set the prefix...

## how to cut prefix from a string

I have a file: chromosome1:436728 chromosome2:32892 ..... chromosome22:23781 I just want to get the number, not the prefix "chromosomeX", so I want to remove all the prefix ahead of the numbers. How can I do that?? Thanks!!! (PS: give me some very simple command so that I can understand...

## how to extract paragraphs from file in BASH script followed by prefix ! , !! and !!!

I]hi all i am in confusion since last 2 days :( i posted thraed yesterday and some friends did help but still i couldnt get solution to my problem let it be very clear i have a long log file of alkatel switch and i have to seperate the minor major and critical alarms shown by ! , !! and !!!...

## extract a particular start and end pattern from a line

hi In the foll example the whole text in a single line.... i want to extract text from IPTel to RTCPBase.h. want to use this acrooss the whole file Updated: IPTel\platform\core\include\RTCPBase.h \main\MWS2051_Sablime_Int\1...

## Need to replace a . with / which is having a matching Prefix

Hi Input File: export NAME='AA.BB.CC' export FILE=1.2.3 AA.BB.CC export MAIL= '1.3.3' export char='XX.YY.ZZ' Out File export NAME='AA/BB/CC' export FILE=1.2.3 AA.BB.CC export MAIL= '1.3.3' export char='XX/YY/ZZ' Only the Lines which have export and have alphabets after =...