Steve's Shell Programming Comments
Overly Vague
Subject: PLEASE HELP me to create a dialog box with clock and big font.. ..how can i make a digital clock(time) appearing in a dialog box...with a big font? please help me sir parker..Why on earth are you asking me? When you do find someone to ask, please specify language, environment, OS, etc.
Stupid
From: igor Subject: xxx I live in russia,concern with breaking in and development computer programm. hachu to wind itself friends from the other countries.We можен are changed URL our site! mail meGo away, Igor. I do not indulge those who want to break or compromise systems they do not own.
Unintelligible
From: rajbinu Subject: resume ineed ur update cv as regularErr... what? You want regular updates of my CV? Why?
Feed me code
Respected Sir, I am grateful that your site has provided me with a lot of help i would like you to give me some simple examples because i am a newbie to shell scripts i would be grateful if u could do so, i really want to master the shell scripts sirThe site is full of examples. There are more in /code/sh/. You're not getting any special treatment just because you call me "Respected Sir".
Your site...
..is very impressive. Its the path that I am about to embark on. Currently I have just certified as a Solaris SA and I am interested to do some SunCluster courses. I would like to pick your brain on SunCluster 3.1 and would be very grateful if you could provide some insight. can I get one IP address from a node to failover to another node? I am not talking about the VIP but rather the IP on say hme0 on node1 to failover to node2 on say qfe0. Is multipathing capable of doing this? Thanks.See docs.sun.com
Classic college student
i need help , i m not a programmer. i m just taking unix to understand
the basic. i m an old man with 5 kids , i want to do this just to get
promoted so i can support my family and send my kids to college. please
help/ don t turn me down . may god help you
thank you
the future of my kids in your hand
please
Bourne Shell I
Write a BOURNE shell program that will output:
your name, your login name, the type of terminal
that you are set up to use, your path, the date
information, the first argument, the third argument
and the set of all arguments passed to the command
when executed. You must use system variables and
commands to output the info. Do not merely type the
values in directly. All output information should be
labeled appropriately. Also show your home directory
and all files in your current working directory. Run the
program two times in a script file and mail that script
file as well as the actual executable file. MAKE SURE
THAT YOU MAKE THE FILE EXECUTABLE FOR YOURSELF.
Bourne Shell II
Write a program that will see all files in the
current working directory and ALL subdirectories
under that directory and find all files in those
directories that are identical. I only want you
to check files not directories. You can use the
recursive option with the current directory to
identify all the files or you can use the find
command. Previous students have found that the
find command makes referencing the file names
in the current working directory and all
subdirectories easier to identify.
C Shell I
Write a C Shell program that produces a menu driven
program with six menu choices. These choices would
(a) allow the user to enter a C Shell command,
(b) set the manual entry for a command, (c) show the
calendar for a specfic month and year, (d) find out
what type of information is stored in a file, (e) find
the difference between two files and (f) quit the
shell script program. The program should continually
loop until the user selects to quit. After each
option is selected, the user should be able to input
the appropriate information to be able to execute the
command requested. A sample run is shown below, with
certain data missing (because I did not want to show
the entire manual entry).
Script started on Tue May 06 19:53:17 2003
polaris% daveMenu
Please select one of the following menu choices
a - issue a C Shell command
b - See the manual entry for a command
c - Show a calendar for a particular month and year
d - Find out what type of information is stored in a file
e - Find out the difference between two files
f - Quit this shell script
Enter your choice now - a
What is the command to be executed? ls
CheckReadAccess file2 marshaMenu subdir
brianMenu file3 readable typescript
checkAlias filep readable10:42 useForeach
checkRead florenceMenu readable11:00 useForeach2
createAlias getFileInfo rewadable useIf
createAlias-CSH holda reyMenu useShiftAgrv
data kithamMenu richardMenu useSwitch
daveMenu krisnMenu setdir2 useWhile
file mar shell1
file1 marshMenu shell2
Please select one of the following menu choices
a - issue a C Shell command
b - See the manual entry for a command
c - Show a calendar for a particular month and year
d - Find out what type of information is stored in a file
e - Find out the difference between two files
f - Quit this shell script
Enter your choice now - b
What is the manual command you would like to see? date
Reformatting page. Wait... done
Fortran Library Routines DATE(3F)
NAME
date - return date in character form
SYNOPSIS
subroutine date (str)
Please select one of the following menu choices
a - issue a C Shell command
b - See the manual entry for a command
c - Show a calendar for a particular month and year
d - Find out what type of information is stored in a file
e - Find out the difference between two files
f - Quit this shell script
Enter your choice now - c
What is the month? 7
What is the year? 1973
July 1973
S M Tu W Th F S
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
Please select one of the following menu choices
a - issue a C Shell command
b - See the manual entry for a command
c - Show a calendar for a particular month and year
d - Find out what type of information is stored in a file
e - Find out the difference between two files
f - Quit this shell script
Enter your choice now - d
What is the name of the file? daveMenu
daveMenu: executable c-shell script
Please select one of the following menu choices
a - issue a C Shell command
b - See the manual entry for a command
c - Show a calendar for a particular month and year
d - Find out what type of information is stored in a file
e - Find out the difference between two files
f - Quit this shell script
Enter your choice now - e
What is the first file? file1
What is the second file? file3
1c1,2
< Wed Apr 30 22:23:40 EDT 2003
---
> 1d0
> < Wed Apr 30 22:23:40 EDT 2003
Please select one of the following menu choices
a - issue a C Shell command
b - See the manual entry for a command
c - Show a calendar for a particular month and year
d - Find out what type of information is stored in a file
e - Find out the difference between two files
f - Quit this shell script
Enter your choice now - f
polaris%
script done on Tue May 06 19:55:46 2003
C Shell 2
Write a C Shell program that would have for input arguments.
These four input arguments would all be integers. The shell
script program should find the sum of (a*i + b) for i
starting at c and going all the way to d. What are a, b, c,
and d? These are the four arguments used when the script
file is called (also called positional paremeters).
An example of the call would be:
shellname 7 3 8 11
This means that inside the script program you should find
the sum
(7*8 + 3) + (7*9 + 3) + (7*10 + 3) + (7*11 + 3) = 278
Of course, the program could be called with any four integers
as the positional parameters.
Korn Shell I
Write a shell program that will continually allow
the user to input a numeric average for a number
of students. After each grade is input the program
will output the letter grade for that student. It
will continue to ask for more grades until the user
enters -1 to stop. Once the user enters -1, have
program output the numeric average for all students.
A sample run could be:
What is the next student\'s numeric average? 82
That student got a B for the semester.
What is the next student\'s numeric average? 77
That student got a C for the semester.
What is the next student\'s numeric average? 86
That student got a B for the semester.
What is the next student\'s numeric average? 62
That student got a D for the semester.
What is the next student\'s numeric average? 95
That student got a A for the semester.
What is the next student\'s numeric average? -99
The average for all students is 80.4
In testing the execution on Polaris, one of the students in the class
noticed that the floating point option for numeric calculations does
not seem to work. Therefore, it is OK to simply output the truncation
integral average. The output would look like :
The average for all students is 80
Sorry, I hadn\'t tested this before. I just assumed that it would work.
Korn Shell II
Write a function that will have as input a single
integer. The function should determine the number
of pairs of files in the current working directory
which differ by n or fewer lines. In a script file
load this function and then run it. Upon return
from this call to the function output the value returned.
Frankly, I do not believe your claim that you are not a 17yr-old
college student, but whoever you are, I don't do your coursework for you.
BASIC???
hi I would like to ask you about how can I get lessons on programming in basic?No.
Brain Dump
hi I am vani from india... can u do one favour for me? i am some simple programs .. in operating system and networking lab.. can u help me.. if possible send reply to this id then i will send my programs to u.Unlike some Brits, I've no problem with outsourcing skills to India. Doing peoples' career development for them, for free, is not something I do, though.
Vagueness
Write a shell script for comparing files with same names in two directories shell script to emilinate all comment lines in a C program and write the output to another file.Not as simple as it might sound, if you include C and C++ style comments. Go away and do your own homework.
Irrelevance
can you tell me why my internet cuts off i get a you have just ignord a incoming call and the internet is cut off this can cut off with in 5 mins or 10 and so on can you help me with this pleaseEh? Sounds like a call waiting issue with dialup, but I don't do PC support.
Hall of Shame