topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 4:08 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Finished Coding Snack: Separate .txt file at any specified punctuation mark  (Read 42426 times)

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
There you go. Next time you run, you'll get build 0.2 which includes numbering thus:

00001. Faust is the protagonist of a classic German legend; a highly successful scholar,
00002. but also dissatisfied with his life,
00003. and so makes a deal with the devil,
00004. exchanging his soul for unlimited knowledge and worldly pleasures.
00005. Faust's tale is the basis for many literary,
00006. artistic,
00007. cinematic,
00008. and musical works.

Quidnunc

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 16
    • View Profile
    • Donate to Member

PERFECT!!!!   

Thanks again, you are a star!!!!

Trevor

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
 :-[

But I'll take it  :D

db90h

  • Coding Snacks Author
  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 481
  • Software Engineer
    • View Profile
    • Bitsum - Take control of your PC
    • Read more about this member.
    • Donate to Member
This is why GNU on Windows (or Cygwin as I use) is a good idea. The classic tools available on the linux command line can do almost anything you want regarding text file formatting, reformatting, or parsing. Of course, they go far beyond that, but if everyone learned the basics of linux shell scripting, which is now so easily applied to Windows, they could solve [their own] simple problems very easily. However, I suppose some people are better than others with scripting, I dunno. It is a bit unforgiving in syntax, and you do have to have 'that type' of mind.

Of course, having a programmer write you a custom solution is even better ;)

Quidnunc

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 16
    • View Profile
    • Donate to Member


"if everyone learned the basics of linux shell scripting, which is now so easily applied to Windows, they could solve [their own] simple problems very easily."

This is a fine sentiment BUT firstly, not everyone wants to learn the skills necessary to accomplish this; at 74 I would (and do) find it difficult to understand all the 'jargon' used by computer techies and if you don't understand the language it is even more difficult to learn the skills. Secondly, the people who offer their expertise on websites such as this do so for their own reasons--recognition, the challenge, even fame of a sort so if everyone did as you suggest a large number of people, including yourself I suspect, would be denied these rewards.  People like me are, or should be, forever grateful to people like you and all the others who give up their time and energies to solve a problem.  The problem I had (and solved by Timns) is, for the present at least, a one off.  At this time I don't envisage needing another problem resolving.  Should I have gone to the lengths you suggest to resolve it myself, or give it to some one else who then gets the credit, the reward and my gratitude?  It would be interesting to hear the views of others--both users and doers.

Quidnunc


wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,190
    • View Profile
    • Donate to Member
^ My sentiment?  I agree with you- that's why we have a consumer economy, even when you aren't selling something.  Everyone doesn't have the time nor inclination to learn certain skills, and that's why those skills are in demand.  I could learn to do all sorts of things around my house, but I'd rather pay someone to do them.  Because spending the money is more convenient to me than spending the time to learn, and the time to code it, where someone else has that inclination.  The same thing with my car.  I know the principles behind a lot of things, i.e. changing the oil, etc.  But I don't want to learn, nor do I care to do it.

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
 
I took db90h's comment to be a helpful pointer for those of us who might like to delve further.
Being one of those who do not (in this particular case), I heartily concur with his final comment — "Of course, having a programmer write you a custom solution is even better."

The very purpose of DC is, for those who can, to do; we're very fortunate to have a core group of doers.

That said, I believe that we benefit both from the solution providers in specific instances and from the peripheral information and suggestions that help to enlarge our awareness. It never hurts to know what one does not know.

 

Quidnunc

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 16
    • View Profile
    • Donate to Member
It most definitely was not my intention to critcise db90h. The part of his message I quoted explicitly states: "if 'everyone'...." and I was simply saying that not everyone can easily do this.  If what I said has in any way caused offense, or implied any adverse criticism either of db90h or any other member then please accept my sincere apologies.

As an aside, being a newcomer to this website I am not sure what is the correct procedure for posting.  For example this thread has moved away from the original topic and I would presume should be in another place/forum.

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
As with db90h no doubt, often times I think to myself "pfft, I could do that" when a small challenge comes along. And about half the time I'll give it a go.

But even as a programmer, I find myself relying on DC for quick solutions similar to this rather than always rolling my own.

In this case, I wrote this one becuase I knew I could do it pretty quickly and with the right sort of balance of time spent / satisfaction and knowledge gained. And the fun of tinkering with Regular Expressions.

And what has really helped is, Quidnunc, you're a pleasure to deal with as well as a generous donor  :Thmbsup:

timns

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,211
    • View Profile
    • Donate to Member
Speaking of which, can I get my title updated to "Lord of all Creation?" "Coding Snacks Author"  8) somehow?

Quidnunc

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 16
    • View Profile
    • Donate to Member
Thank you for those kind words and yes, in my estimation you are entitled to adopt any title you wish.