LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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


Reply
  Search this Thread
Old 10-19-2018, 01:43 AM   #1
NexoR
LQ Newbie
 
Registered: Oct 2018
Posts: 2

Rep: Reputation: Disabled
Crunch comand


Hello,

I created a wordlist file using the crunch command to generate all the 10 digit that starts with 05XXXXXXXX.
this is a huge list. I realized after creating it that I don't need the following numbers that start with 051,056,059,057

can anybody help me with a command the deletes these lines?

thank you
 
Old 10-19-2018, 01:49 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,328
Blog Entries: 3

Rep: Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726Reputation: 3726
The utility sed is one of the easy options for that task.

Code:
sed -e '/^051,/d' < input.file.text > output.file.text
See "man sed" for the reference manual and Bruce Barnett's site for a tutorial on sed.
 
Old 10-19-2018, 01:51 AM   #3
NexoR
LQ Newbie
 
Registered: Oct 2018
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thank you Turbocapitalist
 
  


Reply



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
Using Crunch with a partially known password crunchnewbie Linux - Security 2 01-02-2014 02:19 PM
Backtrack CRUNCH backtracklinux Linux - Newbie 9 09-21-2013 02:41 AM
Crunch Bang Linux gavmoulds Linux - Newbie 2 03-18-2012 05:31 PM
Why the Disk Workout (Crunchy Crunch)? GTrax Linux - General 2 03-18-2007 04:18 AM
LFS (another q from the crunch) Crunch Linux - Newbie 6 02-22-2003 01:58 PM

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

All times are GMT -5. The time now is 06:29 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