Welcome to DU! The truly grassroots left-of-center political community where regular people, not algorithms, drive the discussions and set the standards. Join the community: Create a free account Support DU (and get rid of ads!): Become a Star Member Latest Breaking News Editorials & Other Articles General Discussion The DU Lounge All Forums Issue Forums Culture Forums Alliance Forums Region Forums Support Forums Help & Search

Hermit-The-Prog

(36,631 posts)
3. exceptions
Thu Mar 29, 2018, 04:18 PM
Mar 2018

There are exceptions to that. I wrote one to back up files to CDs, 'way back before DVDs. It contains full documentation -- name, license, where to get it, outline (I., II., III., etc., of process, variables, user prompts, checks, functions), and finishes with "# an added attraction for those who are not easily offended by bad ascii art" -- an ASCII flowchart.

I used that thing even after DVDs came along because the target maximum "iso" image was set by user input. Of course, hard drives became a cheaper backup media very near the same time as DVDs appeared.

Then there is the 44K bash script I wrote which is a prime example of your rule. Its purpose was to tie a conglomerated mess of a business data system together. They had a dos-based data entry system whose output had to be transmogrified to go into a postgresql database on a GNU/Linux system to produce monthly bills and reports. It worked for 6 years and was chock full of 'corner cases'. There are bits and pieces of it I might be able to explain now. It became a sort of Jenga -- edit only certain parts known not to break.

Recommendations

0 members have recommended this reply (displayed in chronological order):

You have to pedal like hell to get up a hill? Fullduplexxx Mar 2018 #1
shell scripts are the APL of scripting languages. lapfog_1 Mar 2018 #2
exceptions Hermit-The-Prog Mar 2018 #3
deep, dark secrets of bash Hermit-The-Prog Mar 2018 #4
"MS-DOS is sniffing glue..." hunter Apr 2018 #5
Latest Discussions»Help & Search»Computer Help and Support»"Writing a shell script i...»Reply #3