$ hostname cpsrhc1.cps.udayton.edu $ ./myshell $ uptime 15:02:39 up 2 days, 23:21, 4 users, load average: 0.00, 0.00, 0.00 $ ls /usr/include/sys acct.h ioctl.h poll.h shm.h sysmacros.h user.h bitypes.h io.h prctl.h signal.h termios.h ustat.h cdefs.h ipc.h procfs.h socket.h timeb.h utsname.h debugreg.h kdaemon.h profil.h socketvar.h time.h vfs.h dir.h kd.h ptrace.h soundcard.h times.h vlimit.h elf.h klog.h queue.h statfs.h timex.h vm86.h epoll.h mman.h quota.h stat.h ttychars.h vt.h errno.h mount.h raw.h statvfs.h ttydefaults.h vtimes.h fcntl.h msg.h reboot.h stropts.h types.h wait.h file.h mtio.h reg.h swap.h ucontext.h xattr.h fsuid.h param.h resource.h syscall.h uio.h gmon.h pci.h select.h sysctl.h ultrasound.h gmon_out.h perm.h sem.h sysinfo.h un.h inotify.h personality.h sendfile.h syslog.h unistd.h $ ls -l /usr/include/sys total 428K -rw-r--r-- 1 root root 2571 Jan 5 19:13 acct.h -rw-r--r-- 1 root root 86 Jan 5 19:13 bitypes.h -rw-r--r-- 1 root root 11339 Jan 5 19:13 cdefs.h -rw-r--r-- 1 root root 4093 Jan 5 19:13 debugreg.h -rw-r--r-- 1 root root 989 Jan 5 19:13 dir.h -rw-r--r-- 1 root root 1012 Jan 5 19:13 elf.h -rw-r--r-- 1 root root 3632 Jan 5 19:13 epoll.h -rw-r--r-- 1 root root 19 Jan 5 19:13 errno.h -rw-r--r-- 1 root root 19 Jan 5 19:13 fcntl.h -rw-r--r-- 1 root root 1756 Jan 5 19:13 file.h -rw-r--r-- 1 root root 1255 Jan 5 19:13 fsuid.h -rw-r--r-- 1 root root 6109 Jan 5 19:13 gmon.h -rw-r--r-- 1 root root 2703 Jan 5 19:13 gmon_out.h -rw-r--r-- 1 root root 3660 Jan 5 19:13 inotify.h -rw-r--r-- 1 root root 1825 Jan 5 19:13 ioctl.h -rw-r--r-- 1 root root 4958 Jan 5 19:13 io.h -rw-r--r-- 1 root root 1706 Jan 5 19:13 ipc.h -rw-r--r-- 1 root root 1168 Jan 5 19:13 kdaemon.h -rw-r--r-- 1 root root 1185 Jan 5 19:13 kd.h -rw-r--r-- 1 root root 1271 Jan 5 19:13 klog.h -rw-r--r-- 1 root root 5642 Jan 5 19:13 mman.h -rw-r--r-- 1 root root 4433 Jan 5 19:13 mount.h -rw-r--r-- 1 root root 2412 Jan 5 19:13 msg.h -rw-r--r-- 1 root root 11230 Jan 5 19:13 mtio.h -rw-r--r-- 1 root root 2266 Jan 5 19:13 param.h -rw-r--r-- 1 root root 984 Jan 5 19:13 pci.h -rw-r--r-- 1 root root 1194 Jan 5 19:13 perm.h -rw-r--r-- 1 root root 2496 Jan 5 19:13 personality.h -rw-r--r-- 1 root root 2554 Jan 5 19:13 poll.h -rw-r--r-- 1 root root 1126 Jan 5 19:13 prctl.h -rw-r--r-- 1 root root 4658 Jan 5 19:13 procfs.h -rw-r--r-- 1 root root 2020 Jan 5 19:13 profil.h -rw-r--r-- 1 root root 4778 Jan 5 19:13 ptrace.h -rw-r--r-- 1 root root 18990 Jan 5 19:13 queue.h -rw-r--r-- 1 root root 7903 Jan 5 19:13 quota.h -rw-r--r-- 1 root root 1243 Jan 5 19:13 raw.h -rw-r--r-- 1 root root 1565 Jan 5 19:13 reboot.h -rw-r--r-- 1 root root 1296 Jan 5 19:13 reg.h -rw-r--r-- 1 root root 3736 Jan 5 19:13 resource.h -rw-r--r-- 1 root root 4159 Jan 5 19:13 select.h -rw-r--r-- 1 root root 2120 Jan 5 19:13 sem.h -rw-r--r-- 1 root root 1883 Jan 5 19:13 sendfile.h -rw-r--r-- 1 root root 1965 Jan 5 19:13 shm.h -rw-r--r-- 1 root root 20 Jan 5 19:13 signal.h -rw-r--r-- 1 root root 9191 Jan 5 19:13 socket.h -rw-r--r-- 1 root root 141 Jan 5 19:13 socketvar.h -rw-r--r-- 1 root root 29 Jan 5 19:13 soundcard.h -rw-r--r-- 1 root root 2185 Jan 5 19:13 statfs.h -rw-r--r-- 1 root root 16068 Jan 5 19:13 stat.h -rw-r--r-- 1 root root 2905 Jan 5 19:13 statvfs.h -rw-r--r-- 1 root root 21 Jan 5 19:13 stropts.h -rw-r--r-- 1 root root 1597 Jan 5 19:13 swap.h -rw-r--r-- 1 root root 1403 Jan 5 19:13 syscall.h -rw-r--r-- 1 root root 2064 Jan 5 19:13 sysctl.h -rw-r--r-- 1 root root 1591 Jan 5 19:13 sysinfo.h -rw-r--r-- 1 root root 7703 Jan 5 19:13 syslog.h -rw-r--r-- 1 root root 2449 Jan 5 19:13 sysmacros.h -rw-r--r-- 1 root root 74 Jan 5 19:13 termios.h -rw-r--r-- 1 root root 1466 Jan 5 19:13 timeb.h -rw-r--r-- 1 root root 6828 Jan 5 19:13 time.h -rw-r--r-- 1 root root 1692 Jan 5 19:13 times.h -rw-r--r-- 1 root root 4750 Jan 5 19:13 timex.h -rw-r--r-- 1 root root 2499 Jan 5 19:13 ttychars.h -rw-r--r-- 1 root root 3568 Jan 5 19:13 ttydefaults.h -rw-r--r-- 1 root root 6775 Jan 5 19:13 types.h -rw-r--r-- 1 root root 3148 Jan 5 19:13 ucontext.h -rw-r--r-- 1 root root 2016 Jan 5 19:13 uio.h -rw-r--r-- 1 root root 30 Jan 5 19:13 ultrasound.h -rw-r--r-- 1 root root 1532 Jan 5 19:13 un.h -rw-r--r-- 1 root root 20 Jan 5 19:13 unistd.h -rw-r--r-- 1 root root 2687 Jan 5 19:13 user.h -rw-r--r-- 1 root root 1214 Jan 5 19:13 ustat.h -rw-r--r-- 1 root root 2562 Jan 5 19:13 utsname.h -rw-r--r-- 1 root root 161 Jan 5 19:13 vfs.h -rw-r--r-- 1 root root 1959 Jan 5 19:13 vlimit.h -rw-r--r-- 1 root root 1193 Jan 5 19:13 vm86.h -rw-r--r-- 1 root root 22 Jan 5 19:13 vt.h -rw-r--r-- 1 root root 2542 Jan 5 19:13 vtimes.h -rw-r--r-- 1 root root 6620 Jan 5 19:13 wait.h -rw-r--r-- 1 root root 4337 Jan 5 19:13 xattr.h $ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 35G 4.2G 30G 13% / /dev/hda1 99M 32M 63M 34% /boot tmpfs 188M 0 188M 0% /dev/shm 131.238.19.7:/home/cps346-01.15 131G 5.1G 119G 5% /home/cps346-01.15 131.238.19.7:/home/cps346-01.16 131G 5.1G 119G 5% /home/cps346-01.16 131.238.19.7:/home/cps346-01.17 131G 5.1G 119G 5% /home/cps346-01.17 $ wc -l /etc/profile 54 /etc/profile $ cat > commands uptime ls /usr/include/sys ls -l /usr/include/sys df -h wc -l /etc/profile ^D $ cat commands uptime ls /usr/include/sys ls -l /usr/include/sys df -h wc -l /etc/profile $ ./myshell < commands 17:52:45 up 9 days, 2:17, 3 users, load average: 0.02, 0.01, 0.00 acct.h ioctl.h poll.h shm.h sysmacros.h user.h bitypes.h io.h prctl.h signal.h termios.h ustat.h cdefs.h ipc.h procfs.h socket.h timeb.h utsname.h debugreg.h kdaemon.h profil.h socketvar.h time.h vfs.h dir.h kd.h ptrace.h soundcard.h times.h vlimit.h elf.h klog.h queue.h statfs.h timex.h vm86.h epoll.h mman.h quota.h stat.h ttychars.h vt.h errno.h mount.h raw.h statvfs.h ttydefaults.h vtimes.h fcntl.h msg.h reboot.h stropts.h types.h wait.h file.h mtio.h reg.h swap.h ucontext.h xattr.h fsuid.h param.h resource.h syscall.h uio.h gmon.h pci.h select.h sysctl.h ultrasound.h gmon_out.h perm.h sem.h sysinfo.h un.h inotify.h personality.h sendfile.h syslog.h unistd.h total 428K -rw-r--r-- 1 root root 2571 Jan 5 19:13 acct.h -rw-r--r-- 1 root root 86 Jan 5 19:13 bitypes.h -rw-r--r-- 1 root root 11339 Jan 5 19:13 cdefs.h -rw-r--r-- 1 root root 4093 Jan 5 19:13 debugreg.h -rw-r--r-- 1 root root 989 Jan 5 19:13 dir.h -rw-r--r-- 1 root root 1012 Jan 5 19:13 elf.h -rw-r--r-- 1 root root 3632 Jan 5 19:13 epoll.h -rw-r--r-- 1 root root 19 Jan 5 19:13 errno.h -rw-r--r-- 1 root root 19 Jan 5 19:13 fcntl.h -rw-r--r-- 1 root root 1756 Jan 5 19:13 file.h -rw-r--r-- 1 root root 1255 Jan 5 19:13 fsuid.h -rw-r--r-- 1 root root 6109 Jan 5 19:13 gmon.h -rw-r--r-- 1 root root 2703 Jan 5 19:13 gmon_out.h -rw-r--r-- 1 root root 3660 Jan 5 19:13 inotify.h -rw-r--r-- 1 root root 1825 Jan 5 19:13 ioctl.h -rw-r--r-- 1 root root 4958 Jan 5 19:13 io.h -rw-r--r-- 1 root root 1706 Jan 5 19:13 ipc.h -rw-r--r-- 1 root root 1168 Jan 5 19:13 kdaemon.h -rw-r--r-- 1 root root 1185 Jan 5 19:13 kd.h -rw-r--r-- 1 root root 1271 Jan 5 19:13 klog.h -rw-r--r-- 1 root root 5642 Jan 5 19:13 mman.h -rw-r--r-- 1 root root 4433 Jan 5 19:13 mount.h -rw-r--r-- 1 root root 2412 Jan 5 19:13 msg.h -rw-r--r-- 1 root root 11230 Jan 5 19:13 mtio.h -rw-r--r-- 1 root root 2266 Jan 5 19:13 param.h -rw-r--r-- 1 root root 984 Jan 5 19:13 pci.h -rw-r--r-- 1 root root 1194 Jan 5 19:13 perm.h -rw-r--r-- 1 root root 2496 Jan 5 19:13 personality.h -rw-r--r-- 1 root root 2554 Jan 5 19:13 poll.h -rw-r--r-- 1 root root 1126 Jan 5 19:13 prctl.h -rw-r--r-- 1 root root 4658 Jan 5 19:13 procfs.h -rw-r--r-- 1 root root 2020 Jan 5 19:13 profil.h -rw-r--r-- 1 root root 4778 Jan 5 19:13 ptrace.h -rw-r--r-- 1 root root 18990 Jan 5 19:13 queue.h -rw-r--r-- 1 root root 7903 Jan 5 19:13 quota.h -rw-r--r-- 1 root root 1243 Jan 5 19:13 raw.h -rw-r--r-- 1 root root 1565 Jan 5 19:13 reboot.h -rw-r--r-- 1 root root 1296 Jan 5 19:13 reg.h -rw-r--r-- 1 root root 3736 Jan 5 19:13 resource.h -rw-r--r-- 1 root root 4159 Jan 5 19:13 select.h -rw-r--r-- 1 root root 2120 Jan 5 19:13 sem.h -rw-r--r-- 1 root root 1883 Jan 5 19:13 sendfile.h -rw-r--r-- 1 root root 1965 Jan 5 19:13 shm.h -rw-r--r-- 1 root root 20 Jan 5 19:13 signal.h -rw-r--r-- 1 root root 9191 Jan 5 19:13 socket.h -rw-r--r-- 1 root root 141 Jan 5 19:13 socketvar.h -rw-r--r-- 1 root root 29 Jan 5 19:13 soundcard.h -rw-r--r-- 1 root root 2185 Jan 5 19:13 statfs.h -rw-r--r-- 1 root root 16068 Jan 5 19:13 stat.h -rw-r--r-- 1 root root 2905 Jan 5 19:13 statvfs.h -rw-r--r-- 1 root root 21 Jan 5 19:13 stropts.h -rw-r--r-- 1 root root 1597 Jan 5 19:13 swap.h -rw-r--r-- 1 root root 1403 Jan 5 19:13 syscall.h -rw-r--r-- 1 root root 2064 Jan 5 19:13 sysctl.h -rw-r--r-- 1 root root 1591 Jan 5 19:13 sysinfo.h -rw-r--r-- 1 root root 7703 Jan 5 19:13 syslog.h -rw-r--r-- 1 root root 2449 Jan 5 19:13 sysmacros.h -rw-r--r-- 1 root root 74 Jan 5 19:13 termios.h -rw-r--r-- 1 root root 1466 Jan 5 19:13 timeb.h -rw-r--r-- 1 root root 6828 Jan 5 19:13 time.h -rw-r--r-- 1 root root 1692 Jan 5 19:13 times.h -rw-r--r-- 1 root root 4750 Jan 5 19:13 timex.h -rw-r--r-- 1 root root 2499 Jan 5 19:13 ttychars.h -rw-r--r-- 1 root root 3568 Jan 5 19:13 ttydefaults.h -rw-r--r-- 1 root root 6775 Jan 5 19:13 types.h -rw-r--r-- 1 root root 3148 Jan 5 19:13 ucontext.h -rw-r--r-- 1 root root 2016 Jan 5 19:13 uio.h -rw-r--r-- 1 root root 30 Jan 5 19:13 ultrasound.h -rw-r--r-- 1 root root 1532 Jan 5 19:13 un.h -rw-r--r-- 1 root root 20 Jan 5 19:13 unistd.h -rw-r--r-- 1 root root 2687 Jan 5 19:13 user.h -rw-r--r-- 1 root root 1214 Jan 5 19:13 ustat.h -rw-r--r-- 1 root root 2562 Jan 5 19:13 utsname.h -rw-r--r-- 1 root root 161 Jan 5 19:13 vfs.h -rw-r--r-- 1 root root 1959 Jan 5 19:13 vlimit.h -rw-r--r-- 1 root root 1193 Jan 5 19:13 vm86.h -rw-r--r-- 1 root root 22 Jan 5 19:13 vt.h -rw-r--r-- 1 root root 2542 Jan 5 19:13 vtimes.h -rw-r--r-- 1 root root 6620 Jan 5 19:13 wait.h -rw-r--r-- 1 root root 4337 Jan 5 19:13 xattr.h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 35G 4.2G 30G 13% / /dev/hda1 99M 32M 63M 34% /boot tmpfs 188M 0 188M 0% /dev/shm 131.238.19.7:/home/cps346-01.15 131G 5.4G 119G 5% /home/cps346-01.15 131.238.19.7:/home/cps346-01.16 131G 5.4G 119G 5% /home/cps346-01.12 131.238.19.7:/home/cps346-01.17 131G 5.4G 119G 5% /home/cps346-01.17 54 /etc/profile $ ./myshell commands 17:52:45 up 9 days, 2:17, 3 users, load average: 0.02, 0.01, 0.00 acct.h ioctl.h poll.h shm.h sysmacros.h user.h bitypes.h io.h prctl.h signal.h termios.h ustat.h cdefs.h ipc.h procfs.h socket.h timeb.h utsname.h debugreg.h kdaemon.h profil.h socketvar.h time.h vfs.h dir.h kd.h ptrace.h soundcard.h times.h vlimit.h elf.h klog.h queue.h statfs.h timex.h vm86.h epoll.h mman.h quota.h stat.h ttychars.h vt.h errno.h mount.h raw.h statvfs.h ttydefaults.h vtimes.h fcntl.h msg.h reboot.h stropts.h types.h wait.h file.h mtio.h reg.h swap.h ucontext.h xattr.h fsuid.h param.h resource.h syscall.h uio.h gmon.h pci.h select.h sysctl.h ultrasound.h gmon_out.h perm.h sem.h sysinfo.h un.h inotify.h personality.h sendfile.h syslog.h unistd.h total 428K -rw-r--r-- 1 root root 2571 Jan 5 19:13 acct.h -rw-r--r-- 1 root root 86 Jan 5 19:13 bitypes.h -rw-r--r-- 1 root root 11339 Jan 5 19:13 cdefs.h -rw-r--r-- 1 root root 4093 Jan 5 19:13 debugreg.h -rw-r--r-- 1 root root 989 Jan 5 19:13 dir.h -rw-r--r-- 1 root root 1012 Jan 5 19:13 elf.h -rw-r--r-- 1 root root 3632 Jan 5 19:13 epoll.h -rw-r--r-- 1 root root 19 Jan 5 19:13 errno.h -rw-r--r-- 1 root root 19 Jan 5 19:13 fcntl.h -rw-r--r-- 1 root root 1756 Jan 5 19:13 file.h -rw-r--r-- 1 root root 1255 Jan 5 19:13 fsuid.h -rw-r--r-- 1 root root 6109 Jan 5 19:13 gmon.h -rw-r--r-- 1 root root 2703 Jan 5 19:13 gmon_out.h -rw-r--r-- 1 root root 3660 Jan 5 19:13 inotify.h -rw-r--r-- 1 root root 1825 Jan 5 19:13 ioctl.h -rw-r--r-- 1 root root 4958 Jan 5 19:13 io.h -rw-r--r-- 1 root root 1706 Jan 5 19:13 ipc.h -rw-r--r-- 1 root root 1168 Jan 5 19:13 kdaemon.h -rw-r--r-- 1 root root 1185 Jan 5 19:13 kd.h -rw-r--r-- 1 root root 1271 Jan 5 19:13 klog.h -rw-r--r-- 1 root root 5642 Jan 5 19:13 mman.h -rw-r--r-- 1 root root 4433 Jan 5 19:13 mount.h -rw-r--r-- 1 root root 2412 Jan 5 19:13 msg.h -rw-r--r-- 1 root root 11230 Jan 5 19:13 mtio.h -rw-r--r-- 1 root root 2266 Jan 5 19:13 param.h -rw-r--r-- 1 root root 984 Jan 5 19:13 pci.h -rw-r--r-- 1 root root 1194 Jan 5 19:13 perm.h -rw-r--r-- 1 root root 2496 Jan 5 19:13 personality.h -rw-r--r-- 1 root root 2554 Jan 5 19:13 poll.h -rw-r--r-- 1 root root 1126 Jan 5 19:13 prctl.h -rw-r--r-- 1 root root 4658 Jan 5 19:13 procfs.h -rw-r--r-- 1 root root 2020 Jan 5 19:13 profil.h -rw-r--r-- 1 root root 4778 Jan 5 19:13 ptrace.h -rw-r--r-- 1 root root 18990 Jan 5 19:13 queue.h -rw-r--r-- 1 root root 7903 Jan 5 19:13 quota.h -rw-r--r-- 1 root root 1243 Jan 5 19:13 raw.h -rw-r--r-- 1 root root 1565 Jan 5 19:13 reboot.h -rw-r--r-- 1 root root 1296 Jan 5 19:13 reg.h -rw-r--r-- 1 root root 3736 Jan 5 19:13 resource.h -rw-r--r-- 1 root root 4159 Jan 5 19:13 select.h -rw-r--r-- 1 root root 2120 Jan 5 19:13 sem.h -rw-r--r-- 1 root root 1883 Jan 5 19:13 sendfile.h -rw-r--r-- 1 root root 1965 Jan 5 19:13 shm.h -rw-r--r-- 1 root root 20 Jan 5 19:13 signal.h -rw-r--r-- 1 root root 9191 Jan 5 19:13 socket.h -rw-r--r-- 1 root root 141 Jan 5 19:13 socketvar.h -rw-r--r-- 1 root root 29 Jan 5 19:13 soundcard.h -rw-r--r-- 1 root root 2185 Jan 5 19:13 statfs.h -rw-r--r-- 1 root root 16068 Jan 5 19:13 stat.h -rw-r--r-- 1 root root 2905 Jan 5 19:13 statvfs.h -rw-r--r-- 1 root root 21 Jan 5 19:13 stropts.h -rw-r--r-- 1 root root 1597 Jan 5 19:13 swap.h -rw-r--r-- 1 root root 1403 Jan 5 19:13 syscall.h -rw-r--r-- 1 root root 2064 Jan 5 19:13 sysctl.h -rw-r--r-- 1 root root 1591 Jan 5 19:13 sysinfo.h -rw-r--r-- 1 root root 7703 Jan 5 19:13 syslog.h -rw-r--r-- 1 root root 2449 Jan 5 19:13 sysmacros.h -rw-r--r-- 1 root root 74 Jan 5 19:13 termios.h -rw-r--r-- 1 root root 1466 Jan 5 19:13 timeb.h -rw-r--r-- 1 root root 6828 Jan 5 19:13 time.h -rw-r--r-- 1 root root 1692 Jan 5 19:13 times.h -rw-r--r-- 1 root root 4750 Jan 5 19:13 timex.h -rw-r--r-- 1 root root 2499 Jan 5 19:13 ttychars.h -rw-r--r-- 1 root root 3568 Jan 5 19:13 ttydefaults.h -rw-r--r-- 1 root root 6775 Jan 5 19:13 types.h -rw-r--r-- 1 root root 3148 Jan 5 19:13 ucontext.h -rw-r--r-- 1 root root 2016 Jan 5 19:13 uio.h -rw-r--r-- 1 root root 30 Jan 5 19:13 ultrasound.h -rw-r--r-- 1 root root 1532 Jan 5 19:13 un.h -rw-r--r-- 1 root root 20 Jan 5 19:13 unistd.h -rw-r--r-- 1 root root 2687 Jan 5 19:13 user.h -rw-r--r-- 1 root root 1214 Jan 5 19:13 ustat.h -rw-r--r-- 1 root root 2562 Jan 5 19:13 utsname.h -rw-r--r-- 1 root root 161 Jan 5 19:13 vfs.h -rw-r--r-- 1 root root 1959 Jan 5 19:13 vlimit.h -rw-r--r-- 1 root root 1193 Jan 5 19:13 vm86.h -rw-r--r-- 1 root root 22 Jan 5 19:13 vt.h -rw-r--r-- 1 root root 2542 Jan 5 19:13 vtimes.h -rw-r--r-- 1 root root 6620 Jan 5 19:13 wait.h -rw-r--r-- 1 root root 4337 Jan 5 19:13 xattr.h Filesystem Size Used Avail Use% Mounted on /dev/mapper/VolGroup00-LogVol00 35G 4.2G 30G 13% / /dev/hda1 99M 32M 63M 34% /boot tmpfs 188M 0 188M 0% /dev/shm 131.238.19.7:/home/cps346-01.15 131G 5.4G 119G 5% /home/cps346-01.15 131.238.19.7:/home/cps346-01.16 131G 5.4G 119G 5% /home/cps346-01.12 131.238.19.7:/home/cps346-01.17 131G 5.4G 119G 5% /home/cps346-01.17 54 /etc/profil $ wc < /etc/profile 54 146 937 $ ls -lh /usr/include/sys > lsout.txt $ ls -i /usr/include/sys >> lsout.txt $ wc < /etc/profile > wc_counts.txt $ wc < lsout.txt >> wc_counts.txt $ cat > commands wc < /etc/profile ls -lh /usr/include/sys > lsout.txt ls -i /usr/include/sys >> lsout.txt wc < /etc/profile > wc_counts.txt wc < lsout.txt >> wc_counts.txt ^D $ cat commands wc < /etc/profile ls -lh /usr/include/sys > lsout.txt ls -i /usr/include/sys >> lsout.txt wc < /etc/profile > wc_counts.txt wc < lsout.txt >> wc_counts.txt $ ./myshell < commands 54 146 937 $ ./myshell commands 54 146 937 $ environ MANPATH=/usr/dt/man:/usr/man:/usr/openwin/share/man:/usr/share/man:/usr/local/man:/usr/sfw/man:/opt/sfw/man HOSTNAME=cpsrhc1.cps.udayton.edu TERM=vt100 SHELL=/bin/bash HISTSIZE=1000 HISTORY=32 KDE_NO_IPV6=1 SSH_CLIENT=131.238.214.142 47330 22 SSH_TTY=/dev/pts/3 USER=a_user LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35: ENV=/home/a_user/.bashrc KDEDIR=/usr PAGER=less MAIL=/var/spool/mail/a_user PATH=/usr/sfw/bin:/opt/sfw/bin:/sbin:/usr/ccs/bin:/bin:/usr/sbin:/usr/bin:/usr/games:/home/a_user/bin:/usr/local/bin:/usr/X11R6/bin:/usr/openwin/bin:/usr/ucb/:/usr/local/TeX/bin/sparc-solaris2.7 BLOCKSIZE=K EXINIT=set ruler showmode showmatch INPUTRC=/etc/inputrc PWD=/home/a_user/shell EDITOR=vi KDE_IS_PRELINKED=1 LANG=en_US.UTF-8 FCEDIT=vi SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass MANPAGER=less SHLVL=1 HOME=/home/a_user LOGNAME=a_user VISUAL=vi CVS_RSH=ssh SSH_CONNECTION=131.238.214.142 47330 131.238.19.8 22 LESSOPEN=|/usr/bin/lesspipe.sh %s CVSEDITOR=vi DISPLAY=localhost:12.0 G_BROKEN_FILENAMES=1 _=./ush OLDPWD=/home/a_user $ pause Press to continue . . . $ echo Hello world! Hello world! $ environ > envout.txt $ echo Hello world! >> envout.txt $ cat > commands environ echo Hello world! environ > envout.txt echo Hello world! >> envout.txt ^D $ cat commands environ echo Hello world! environ > envout.txt echo Hello world! >> envout.txt $ ./myshell < commands MANPATH=/usr/dt/man:/usr/man:/usr/openwin/share/man:/usr/share/man:/usr/local/man:/usr/sfw/man:/opt/sfw/man HOSTNAME=cpsrhc1.cps.udayton.edu TERM=vt100 SHELL=/bin/bash HISTSIZE=1000 HISTORY=32 KDE_NO_IPV6=1 SSH_CLIENT=69.135.208.30 41442 22 SSH_TTY=/dev/pts/2 USER=cps346-01.17 LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35: ENV=/home/cps346-01.17/.bashrc SSH_AUTH_SOCK=/tmp/ssh-iBOiF11935/agent.11935 KDEDIR=/usr PAGER=less MAIL=/var/spool/mail/cps346-01.17 PATH=/usr/sfw/bin:/opt/sfw/bin:/sbin:/usr/ccs/bin:/bin:/usr/sbin:/usr/bin:/usr/games:/home/cps346-01.17/bin:/usr/local/bin:/usr/X11R6/bin:/usr/openwin/bin:/usr/ucb/:/usr/local/TeX/bin/sparc-solaris2.7 BLOCKSIZE=K EXINIT=set ruler showmode showmatch INPUTRC=/etc/inputrc PWD=/home/cps346-01.17/ush-shell EDITOR=vi KDE_IS_PRELINKED=1 LANG=en_US.UTF-8 FCEDIT=vi SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass MANPAGER=less SHLVL=1 HOME=/home/cps346-01.17 LOGNAME=cps346-01.17 VISUAL=vi CVS_RSH=ssh SSH_CONNECTION=69.135.208.30 41442 131.238.19.8 22 LESSOPEN=|/usr/bin/lesspipe.sh %s CVSEDITOR=vi DISPLAY=localhost:11.0 G_BROKEN_FILENAMES=1 _=./ush OLDPWD=/home/cps346-01.17 Hello world! $ ./myshell commands MANPATH=/usr/dt/man:/usr/man:/usr/openwin/share/man:/usr/share/man:/usr/local/man:/usr/sfw/man:/opt/sfw/man HOSTNAME=cpsrhc1.cps.udayton.edu TERM=vt100 SHELL=/bin/bash HISTSIZE=1000 HISTORY=32 KDE_NO_IPV6=1 SSH_CLIENT=69.135.208.30 41442 22 SSH_TTY=/dev/pts/2 USER=cps346-01.17 LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35: ENV=/home/cps346-01.17/.bashrc SSH_AUTH_SOCK=/tmp/ssh-iBOiF11935/agent.11935 KDEDIR=/usr PAGER=less MAIL=/var/spool/mail/cps346-01.17 PATH=/usr/sfw/bin:/opt/sfw/bin:/sbin:/usr/ccs/bin:/bin:/usr/sbin:/usr/bin:/usr/games:/home/cps346-01.17/bin:/usr/local/bin:/usr/X11R6/bin:/usr/openwin/bin:/usr/ucb/:/usr/local/TeX/bin/sparc-solaris2.7 BLOCKSIZE=K EXINIT=set ruler showmode showmatch INPUTRC=/etc/inputrc PWD=/home/cps346-01.17/ush-shell EDITOR=vi KDE_IS_PRELINKED=1 LANG=en_US.UTF-8 FCEDIT=vi SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass MANPAGER=less SHLVL=1 HOME=/home/cps346-01.17 LOGNAME=cps346-01.17 VISUAL=vi CVS_RSH=ssh SSH_CONNECTION=69.135.208.30 41442 131.238.19.8 22 LESSOPEN=|/usr/bin/lesspipe.sh %s CVSEDITOR=vi DISPLAY=localhost:11.0 G_BROKEN_FILENAMES=1 _=./ush OLDPWD=/home/cps346-01.17 Hello world! $ cd /home/a_user $ cd /tmp $ cd /tmp $ cd /etc $ cd /etc