09-19-2002
Can this be made into one single line?
Can someone please suggest a script to make the following into one single (continuous) line so that a pattern search can be carried out on the resulting single line.
Note : Sample (may be shorter or longer) and will be contained in a text file
mstnpkpqrktkrntnrrpqdvkfpgggqivggvyllprrgprlgvrapr
rrqpipkarrpegrtwaqpgypwplygneglgwagwllsprgsrpswgpt
kvidtltcgfadlmgyiplvgaplggaaralahgvrvledgvnyatgnlp
llsclttpasayevhnvsgiyhvtndcsnasivyeaadlimhtpgcvpcv
altptlaarnvtiptttirrhvdllvgaaafcsamyvgdlcgsvflvsql
lqdcncsiypghvsghrmawdmmmnwspttalvvsqllripqavvdmvag
yysmagnwakvlivmllfagvdgdthvtggaqakttnrlvsmfasgpsqk
hinrtalncndslqtgflaalfythsfnssgcpermaqcrtidkfdqgwg
dqrpycwhypppqctivpasevcgpvycftpspvvvgttdrfgvptyrwg
ntrppqgnwfgctwmnstgftktcggppcniggvgnntltcptdcfrkhp
pwltprcmvdypyrlwhypctvnftifkvrmyvggvehrlnaacnwtrge
elsplllsttewqvlpcsfttlpalstglihlhqnivdvqylygigsavv
llfllladarvcaclwmmlliaqaeaalenlvvlnsasvagahgilsflv
rlvpgatyalygvwpllllllalpprayamdremaascggavfvglvllt
rliwwlqyfttraeadlhvwipplnarggrdaiillmcavhpelifditk
vlqagitrvpyfvraqglihacmlvrkvagghyvqmafmklgaltgtyiy
raglrdlavavepvvfsdmetkiitwgadtaacgdiilglpvsarrgkei
rglrllapitaysqqtrgllgciitsltgrdknqvegevqvvstatqsfl
vyhgagsktlaapkgpitqmytnvdqdlvgwpkppgarsltpctcgssdl
pvrrrgdsrgsllsprpvsylkgssggpllcpfghavgifraavctrgva
mettmrspvftdnssppavpqsfqvahlhaptgsgkstkvpaayaaqgyk
tlgfgaymskahgidpnirtgvrtittgapvtystygkfladggcsggay
tdsttilgigtvldqaetagarlvvlatatppgsvtvphpnieevalsnt
pieairggrhlifchskkkcdelaaklsglginavayyrgldvsviptig
mtgytgdfdsvidcntcvtqtvdfsldptftietttvpqdavsrsqrrgr
fvtpgerpsgmfdssvlcecydagcawyeltpaetsvrlraylntpglpv
vftglthidahflsqtkqagdnfpylvayqatvcaraqapppswdqmwkc
ptpllyrlgavqnevtlthpitkyimacmsadlevvtstwvlvggvlaal
vivgriilsgrpaivpdrellyqefdemeecashlpyieqgmqlaeqfkq
kqaeaaapvveskwraletfwakhmwnfisgiqylaglstlpgnpaiasl
lttqstllfnilggwvaaqlappsaasafvgagiagaavgsiglgkvlvd
galvafkvmsgempstedlvnllpailspgalvvgvvcaailrrhvgpge
afasrgnhvspthyvpesdaaarvtqilssltitqllkrlhqwinedcst
wdwictvltdfktwlqskllpqlpgvpffscqrgykgvwrgdgimqttcp
ngsmrivgpktcsntwhgtfpinayttgpctpspapnysralwrvaaeey
yvtgmttdnvkcpcqvpapeffsevdgvrlhryapacrpllreevtfqvg
pcepepdvavltsmltdpshitaetakrrlargsppslasssasqlsaps
spdadlieanllwrqemggnitrvesenkvvvldsfdplraeederevsv
fpaampiwarpdynpplleswkdpdyvppvvhgcplppikappippprrk
ssalaelatktfgssessavdsgtatalpdqasddgdkgsdvesyssmpp
sdgswstvseeasedvvccsmsytwtgalitpcaaeesklpinalsnsll
srsaglrqkkvtfdrlqvlddhyrdvlkemkakastvkakllsveeackl
gygakdvrnlsskavnhihsvwkdlledtvtpidttimaknevfcvqpek
fpdlgvrvcekmalydvvstlpqvvmgssygfqyspgqrveflvntwksk
rcfdstvtendirveesiyqccdlapearqaikslterlyiggpltnskg
sgvlttscgntltcylkasaacraaklqdctmlvngddlvvicesagtqe
amtrysappgdppqpeydlelitscssnvsvahdasgkrvyyltrdpttp
htpvnswlgniimyaptlwarmilmthffsillaqeqlekaldcqiygac
iierlhglsafslhsyspgeinrvasclrklgvpplrvwrhrarsvrarl
gkylfnwavktklkltpipaasrldlsgwfvagysggdiyhslsrarprw
gvgiyllpnr
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hey gents,
I'm working on something that will use snmpwalk to query the devices on my network and retreive the device name, device IP, device model and device serial. I'm using Nmap for the enumeration and sed to clean up the results for use by snmpwalk. Once i get all the data organized I'm... (8 Replies)
Discussion started by: mitch
8 Replies
2. Shell Programming and Scripting
Hello,
Did anyone know how to write a perl script to merge the multi-line into a single line where each line with start at timestamp
Input-->
timestamp=2009-11-10-04.55.20.829347;
a;
b;
c;
timestamp=2009-11-10-04.55.20.829347;
aa;
bb;
cc; (5 Replies)
Discussion started by: happyday
5 Replies
3. Shell Programming and Scripting
Hi all,
I have made at small script to make a simple calculation on a file which is formatted in this way:
I want to create a new file in which the value of particular line minus the previous line is printed.
So my wanted output is:
I have made the following program to do the job... (5 Replies)
Discussion started by: s052866
5 Replies
4. Shell Programming and Scripting
Hi,
I have a requirement with,
No~Dt~Notes
1~2011/08/1~"aaa
bbb
ccc
ddd
eee
fff
ggg
hhh"
Single column alone got splitted into multiple lines.
I require the output as
No~Dt~Notes
1~2011/08/1~"aaa<>bbb<>ccc<>ddd<>eee<>fff<>ggg<>hhh"
mean to say those new lines to be... (1 Reply)
Discussion started by: Bhuvaneswari
1 Replies
5. Shell Programming and Scripting
Hi,
My Oracle query is returing below o/p
----------------------------------------------------------
Ins trnas value
a lkp1 x
a lkp1 y
b lkp1 a
b lkp2 x
b lkp2 y ... (7 Replies)
Discussion started by: gvk25
7 Replies
6. Shell Programming and Scripting
Hi All,
I have 4 big files which contains one big line containing formatted character records, I need to format each file in such way that each File will have 95 Characters per line. Last line of each file will have newline character at end.
Before:-
File Name:- File1.dat
102 121340560... (10 Replies)
Discussion started by: lancesunny
10 Replies
7. Shell Programming and Scripting
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
How can i display the middle line of a file using a single line command? (6 Replies)
Discussion started by: Lakme Pemmaiah
6 Replies
9. UNIX for Beginners Questions & Answers
example of problem:
when I echo "$e" >> /home/cogiz/file.txt
result prints to file as:AA
BB
CC
I need it to save to file as this:AA BB CC
I know it's probably something really simple but any help would be greatly appreciated.
Thank You.
Cogiz (7 Replies)
Discussion started by: cogiz
7 Replies
10. Shell Programming and Scripting
I want to read the log file which was generate from other command . And the output was having multi line in log files for job name and server name. But i need to make all the logs on one line
Source file
07/15/2018 17:02:00 TRANSLOG_1700 Server0005_SQL ... (2 Replies)
Discussion started by: ranjancom2000
2 Replies
LEARN ABOUT CENTOS
glob_match
GLOB_MATCH(9) libata Core Internals GLOB_MATCH(9)
NAME
glob_match - match a text string against a glob-style pattern
SYNOPSIS
int glob_match(const char * text, const char * pattern);
ARGUMENTS
text
the string to be examined
pattern
the glob-style pattern to be matched against
DESCRIPTION
Either/both of text and pattern can be empty strings.
Match text against a glob-style pattern, with wildcards and simple sets:
? matches any single character. * matches any run of characters. [xyz] matches a single character from the set: x, y, or z. [a-d] matches a
single character from the range: a, b, c, or d. [a-d0-9] matches a single character from either range.
The special characters ?, [, -, or *, can be matched using a set, eg. [*] Behaviour with malformed patterns is undefined, though generally
reasonable.
SAMPLE PATTERNS
"SD1?", "SD1[0-5]", "*R0", "SD*1?[012]*xx"
This function uses one level of recursion per '*' in pattern. Since it calls _nothing_ else, and has _no_ explicit local variables, this
will not cause stack problems for any reasonable use here.
RETURNS
0 on match, 1 otherwise.
AUTHOR
Jeff Garzik
Author.
COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 GLOB_MATCH(9)