[CentOS] Off Topic bash question

Thu Jul 23 15:07:30 UTC 2020
Ron Loftin <reloftin at twcny.rr.com>

On Thu, 2020-07-23 at 10:49 -0400, Jerry Geis wrote:
> Sorry - I see it now "remove the cat".
> 
> Thanks "All" for the suggestions.  I wasnt aware of the method to
> avoid the
> cut command.
> 

Here's a few "historical" observations on this thread.

1)  Your original script looks like you were trying to write to the
syntax of the old Bourne ( sometimes called "boring" ) shell.  In the
olden days of Unix in the 20th century, that was the ONE shell you
could reliably expect to be present on the target machine.

2)  You are now using Bash ( Bourne-Again SHell ) which is obviously an
evolutionary development and is much more capable.  It has SO much more
capabilities that ( as others have pointed out ) it can do many things
with internal functions that used to require other tools ( "cat",
"expr", others ) to accomplish.

3)  You write scripts in a similar fashion to the way I do it.  Plenty
of whoopsies and typos along the way to debug.  Since I'm now an old
geezer from the prehistoric times of Unix, I still stick to the old
thumb rule "The man page is your friend" that some people seem to be
forgetting these days.

Just my $0.02 (US) worth.

> Jerry
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos
-- 
Ron Loftin			reloftin at twcny.rr.com

"God, root, what is difference ?"	Piter from UserFriendly