Walt Mankowski via plug on 6 May 2023 06:36:15 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] take-your-bash-scripting-seriously |
Walt Mankowski via plug said on Fri, 5 May 2023 22:28:36 -0400>On Fri, May 05, 2023 at 08:55:46PM -0400, Steve Litt via plug wrote:>> On scripts vs programs. I've always maintained that if you tell a>> computer what to do in the future, you're programming. Whether it's>> 100K lines of C or 2 lines of /bin/sh, if it's non-interactive and>> more than one command, it's programming. If you write a Word macro,>> it's programming.>>Wait, does this mean all my Perl one-liners aren't programs?If I had to take a stand on this I'd say they're programs. If adistinction needs to be made, I spoze they could be called one-liners.
/a/b/c/d
to a/x/y/d
. This is really easy to do in a Perl one-liner:perl -pe ‘s(b/c)(x/y)’
while (<>) { s(b/c)(x/y); print; }
>> I hear people who can work miracles with Perl claim "I'm not a>> programmer!" Nonsense. What, if they converted their script to C all>> of a sudden it would be a program?>>I don't hear many people claim that. Of course, these days it's hard>to find people who'll even admit that they're Perl programmers! :)I hear a lot of people claim that. And if you'd ask them, they'dprobably say they're not Perl programmers, they just use it for admin.I just don't see the need for the distinction at all.
___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug