The Prodigal Son


 
Thread Tools Search this Thread
The Lounge What is on Your Mind? The Prodigal Son
Prev   Next
# 1  
Old 07-30-2013
The Prodigal Son

About 10 years ago I got into K shell scripting in a big way (for a beginner). I absolutely loved it and wrote a number of database maintenance scripts that, while basic, worked extremely well.

Somehow, somewhere I picked up the style of scripting that was very similar to when I was doing Cobol programming, a central "command center" type structure (that was usually at the bottom of the script), that would direct the code to, for example, run section/paragraph/function (whatever the proper name is) 1, return to the command center, then run 2 etc. I saved off my scripts on a CD and they were lost in a move.

I spent the next 10 years in a position that did not involve scripting and I lost/forgot much of what I knew. Now I am again in a scripting position. I'd love to work on being able to recreate some of those type scripts but I haven't been able to find any source on the web or elsewhere that would detail that type scripting.

Can anyone point me to a source, book, web site etc that would enable me to get back to that type of scripting by function/module etc?

Many thanks.

Last edited by Scott; 07-30-2013 at 06:06 PM.. Reason: Thread moved
 
Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How can i use fork,sleep,wait and write in a process with father and son..??

Hi.. I was unable to do (gcc code) which refers to the fork,wait,sleep and write.. what i want to do: A process of father create (fork) a son and will sleep 90 seconds..After this, son process create a grandchild and will sleep 60 seconds..Grandchild process will sleep for 30 seconds..After... (3 Replies)
Discussion started by: gumlucin
3 Replies
Login or Register to Ask a Question
WAIT(2) 							System Calls Manual							   WAIT(2)

NAME
wait - wait for a process to exit SYNOPSIS
#include <u.h> #include <libc.h> int wait(Waitmsg *w) DESCRIPTION
Wait causes a process to wait for any child process (see fork(2)) to exit. It returns the pid of a child that has exited and fills in w with more information about the child. W points to a Waitmsg, which has this structure: typedef struct Waitmsg { char pid[12]; /* of loved one */ char time[3*12]; /* of loved one & descendants */ char msg[ERRLEN]; } Waitmsg; Pid is the child's process id. The time array contains the time the child and its descendants spent in user code, the time spent in system calls, and the child's elapsed real time, all in units of milliseconds. All integers in a Waitmsg are formatted as right-justified textual numbers in 11-byte fields followed by a blank. Msg contains the message that the child specified in exits(2). For a normal exit, msg[0] is zero, otherwise msg is prefixed by the process name, a blank, the process id, and a colon. If there are no more children to wait for, wait returns immediately, with return value -1. SOURCE
/sys/src/libc/9syscall SEE ALSO
fork(2), exits(2), the wait file in proc(3) DIAGNOSTICS
Sets errstr. WAIT(2)