View Single Post

  #1 (permalink)  
Old 06-13-2008, 07:03 AM
supamaka supamaka is offline
Junior Member
User
 
Join Date: Jun 2008
My distro: Fedora
Posts: 1
Rep Power: 0
supamaka is on a distinguished road
Smile Shell script needed

Hello folks,

I am a beginner and this is the first time I have started learning how to deal with Unix based operating system and shell programming, I have a doubt as to how to write a pretty simple shell program, it is very simple for someone who knows shell programming and isn't that simple for the one who doesn't know much about it.

I hope some of the members here help me with either providing references or providing me hints as to how to write the code.

Here is the question:

Write a shell script (bash or sh) that prints out the following lines/information:
  1. Name: "Your name"
  2. Hostname: "The computer's hostname"
  3. Host IP: "The computer's IP number"
  4. Default Gateway: "The computer's default gateway"
  5. OS Version: "Whatever information on the OS version you can get programaticly"
  6. Memory: "The amount of physical memory (not disk) the system has"
  7. CPU Speed: "The CPU speed (in Hz not mip the system thinks it has"
  8. Disk space: "The amount of agregate physical disk the system has"
  9. A list of shells supported on the system for login (One per line)
  10. A blank line (or two)
  11. The shell script
Reply With Quote