Glad it helped, Marina :-) And other folk who have found it useful.
Skybly
Comment 206
Glad it helped, Marina :-) And other folk who have found it useful.
THANKS!
it does work and is really useful.
For the sake of completeness, there are Python solutions at:
http://bytes.com/topic/python/answers/595470-how-remove-number-lines-text-file
@Lillee Nice! I knew someone would come up with an awk solution ;-)
Hey @N Saitung
Yeh you're way of doing it is lazier (which I consider a good thing). Nice.
Interested to follow your progress over onyour blog. Good luck!
Hey @mega. Well I took a bit of a mixed approach. I spent a lot of time on duckduckgo and other search engines, and picking the brains of some very awesome communities on forums and IRC as well as skimming the manuals. My best advice would be don't rush through it, take the time to understand everything you're being shown. And don't worry if it takes more than 7 weeks. It took me about a year!!
You would get rid of the third line of known hosts thusly:awk '{if (NR!=3) {print}}' known_hosts
@Acesabe Brill I had no idea that ssh-keygen -R even existed. That would definitely save some typing which is "a good thing" for a lazy person like me :-)
@Unixboy Wow! sed is amazing. I wonder if someone will goproper old skool and come up with an awk solution?!
Using sed would let you do the same in fewer characterssed '5d' known_hosts > b && mv b known_hosts
Thank you, that was really helpful! Used this to show the most popular recipes for the past month on my website.