Notes
Notes - notes.io |
wc -w Random.txt
4. Output lines consisting the words starting with ‘se’
grep ‘<se’ Random.txt
5. Output list of unique words in the file random.txt
cat Random.txt | tr ' ' 'n' | sort | uniq -u
6. Output list of unique words with frequency counts
cat Random.txt | tr ' ' 'n' | sort | uniq -c
7. Output the first two lines consisting the words ending in ‘ing’
grep ‘ing>’ Random.txt | head -2
8. Output the count of words with 2 or more vowels
grep -o ‘<[^ ]*[aeiou][^ ]*[aeiou][^ ]*>’ Random.txt | wc -w
9. Output the words that end in “ling” using sorting (and not using grep)
10. Output the lines with three or more vowels
grep -i ‘<[^ ]*[aeiou][^ ]*[aeiou][^ ]*[aeiou][^ ]*>’ Random.txt
11. Command to find MAC addresses
grep -i -o '[0-9A-F]{2}(:[0-9A-F]{2}){5}' Random.txt
12. Command to find Email addresses
grep -E -o ‘b[a-zA-Z0-9.-]+@[a-zA-Z0-9.-]+.[a-zA-Z0-9.-]+b’ Random.txt
13. Command to find phone numbers with format XXX-XXX-XXXX
grep -o ‘[[:digit:]]{3}-[[:digit:]]{3}-[[:digit:]]{4}’ Random.txt
14. Command to find IPv6 addresses (this is a complex regex since ipv6 representations can be compressed. You can assume the default format and build the regex.) Note: Bonus points for a full proof regex able to filter compressed Ipv6 addresses.
grep -E -o ‘([0-9a-fA-F]{0,4}:){4,7}[0-9a-fA-F]{4}’ Random.txt
|
Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 12 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team