LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Closed Thread
  Search this Thread
Old 09-25-2019, 02:57 AM   #16
philip370
LQ Newbie
 
Registered: Sep 2019
Posts: 19

Original Poster
Rep: Reputation: Disabled
response


So we have bee give a txt file jumbled we have been asked to find email address and IBAN references
I was able to figure out the grep search string for email addresses caine@caine:~/Downloads$ grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" dump1.txt
I am a bit lost for the IBAN search string. we need to search for (see attachment ) this structure within the junbled txt file..
Attached Thumbnails
Click image for larger version

Name:	Capture.PNG
Views:	21
Size:	6.7 KB
ID:	31387  
 
Old 09-25-2019, 03:12 AM   #17
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,337
Blog Entries: 3

Rep: Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732
What is the formula for the two-digit checksum?

grep will be too simple. You'll probably need a perl one-liner.
 
Old 09-25-2019, 03:18 AM   #18
philip370
LQ Newbie
 
Registered: Sep 2019
Posts: 19

Original Poster
Rep: Reputation: Disabled
Yes I understand.. But we were specifucaly asked to use grep doesnt make sense to me either. I have adked the lecturer but his response was to use the IBAN structure and creat a search string using grep
 
Old 09-25-2019, 03:18 AM   #19
philip370
LQ Newbie
 
Registered: Sep 2019
Posts: 19

Original Poster
Rep: Reputation: Disabled
I appreciate your reply
 
Old 09-25-2019, 03:21 AM   #20
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
you didn't figure out the email address one
you found that with an internet search

nice picture, but why not take a little time to type that out?


here are some sample, within some jumbled text
https://en.wikipedia.org/wiki/ISO_13616
ibansample.sh
Code:
#!/bin/bash
sampletext () {
        cat << EOF
Belgium     BE71096123456769
France  FR7630006000011234567890189
Germany     DE91100000000123456789
Greece  GR9608100010000001234567890
Romania     RO09BCYP0000001234567890
Saudi Arabia    SA4420000001234567891234
Spain   ES7921000813610123456789
Switzerland     CH5604835012345678009
United Kingdom  GB98MIDL07009312345678
EOF
#TODO add junk
}

sampletext
Code:
./ibansample.sh | grep ...
apply what you have learned so far

Last edited by Firerat; 09-25-2019 at 03:56 AM. Reason: was pulling example from wrong iso :) fixed
 
Old 09-25-2019, 03:21 AM   #21
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,337
Blog Entries: 3

Rep: Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732Reputation: 3732
Ok, you basically have the answer in #14 above, but which characters are allowed in the BBAN subcomponent and how many of them are there?
 
Old 09-25-2019, 03:28 AM   #22
philip370
LQ Newbie
 
Registered: Sep 2019
Posts: 19

Original Poster
Rep: Reputation: Disabled
you didn't figure out the email address one
you found that with an internet search

Well spotted Fireat are u a re teacher? what I meant to say is I understand the email search string..
However I dont have an idea of what search string to use for IBAN ok.. forgive me I am new to this and I aooreciate that you guys are experts..
 
Old 09-25-2019, 03:39 AM   #23
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Quote:
Originally Posted by philip370 View Post
you didn't figure out the email address one
you found that with an internet search

Well spotted Fireat are u a re teacher? what I meant to say is I understand the email search string..
However I dont have an idea of what search string to use for IBAN ok.. forgive me I am new to this and I aooreciate that you guys are experts..
you understand the more complex email one?
 
Old 09-25-2019, 03:53 AM   #24
philip370
LQ Newbie
 
Registered: Sep 2019
Posts: 19

Original Poster
Rep: Reputation: Disabled
response

Firerat be nice please
 
Old 09-25-2019, 04:01 AM   #25
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Quote:
Originally Posted by philip370 View Post
Firerat be nice please
so far you have
done nothing.

apart from get defensive when caught in a lie

Last edited by Firerat; 09-25-2019 at 04:02 AM.
 
Old 09-25-2019, 05:03 AM   #26
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
if anyone wants some sample data

Code:
curl "https://www.swift.com/resource/iban-registry-pdf" \
   | pdftohtml -i -c -s - sample_iban
don't cheat by parsing the html

Last edited by Firerat; 09-25-2019 at 05:04 AM.
 
Old 09-25-2019, 05:49 AM   #27
philip370
LQ Newbie
 
Registered: Sep 2019
Posts: 19

Original Poster
Rep: Reputation: Disabled
response

Fieat dont accuse me of lieing please enough ok..
 
Old 09-25-2019, 05:58 AM   #28
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
Quote:
Originally Posted by philip370 View Post
So we have bee give a txt file jumbled we have been asked to find email address and IBAN references
I was able to figure out the grep search string for email addresses caine@caine:~/Downloads$ grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" dump1.txt
I am a bit lost for the IBAN search string. we need to search for (see attachment ) this structure within the junbled txt file..
a lie

if you had figured out that pattern and not simply copy and pasted it, you would be able to do the IBAN pattern you are asking us to give you

Last edited by Firerat; 09-25-2019 at 06:01 AM.
 
Old 09-25-2019, 06:04 AM   #29
philip370
LQ Newbie
 
Registered: Sep 2019
Posts: 19

Original Poster
Rep: Reputation: Disabled
response

Fine fine fine u have the last word
 
Old 09-25-2019, 06:04 AM   #30
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian sid
Posts: 2,683

Rep: Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783Reputation: 783
as soon as you start to show us some progress we will steer you in the right direction

thus far all you have done is ask us to give it to you

you didn't even give us the structure, or sample data
 
  


Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating an alias in ksh that uses grep and includes 'grep -v grep' doug248 Linux - Newbie 2 08-05-2012 02:07 PM
[SOLVED] Grep -p for Linux, Trying to grep a paragraph. ohijames Linux - Newbie 5 07-22-2010 02:09 PM
What does rpm -qa |grep th* (as compared to rpm -qa |grep th) display? davidas Linux - Newbie 2 03-18-2004 01:35 AM
"Undeleting" data using grep, but get "grep: memory exhausted" error SammyK Linux - Software 2 03-13-2004 03:11 PM
ps -ef|grep -v root|grep apache<<result maelstrombob Linux - Newbie 1 09-24-2003 11:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration