Table of Contents

Part 2

Entries

oct 21, 2011

work day. opus,projects,unix.

octuber 24, 2011

Project on puzzle box is done for the most part. working on next.

octuber 13, 2011

After reading up on bash scripting. I made two programs displayed on a web page. while exploring such avaneus I made one from scratch. leaning to keep track of typos is the hard part.

Month Day, Year

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

Remember that 4 is just the minimum number of entries. Feel free to have more.

unix Topics

mkfifo

crrerats FIFO's (also called “named pipes”) with the specified names.

ibase

aseIf you want to demonstrate something on the command-line, you can do so as follows:

RTFM

a term created by programmers that state mandates a programmer, or comp user of UNIX/ Linux based systems must at least try to find a answer to their problems. This must be done before asking a more experienced programmer.

R- read
T- the
F- ****
M- manual 

meta characters

A metacharacter is a character that has a special meaning (instead of a literal meaning) to a computer program, such as a shell interpreter or a regular expression engine.

command: Export

The export command is used to define the variable as one that subshells (shells spawned from the original) should inherit.

rlott@lab46:~$ export PAGER
rlott@LAB46:~$

obase

a command built into the bc program. this command is used to display the output of mathematical computations in binary, octal, base 10, etc.

If you want to demonstrate something on the command-line, you can do so as follows:

FIFO

A FIFO special file is similar to a pipe, except that it is created in a different way. Instead of being an anonymous communications channel, a FIFO special file is entered into the file system by calling mkfifo.

lp

print- command

Directory

files, space for storage of more data, directories, programs.

terminal

Mainly the 'cli' set on a visual screen for user interface.

bin

This directory contains the commands and utilities that you use day to day. These are executable binary files aka bin.

xterm

standard terminal emulator for the X Window System

unix Objective

Objective

Scripting with bash and programming concepts. using bash in the vi editor to write the program code. successful execution of the {chmod} command in order to change the file format from rw, read-write. To a executable format via program file.

Method

after a well developed presentation on the inner working of bash, vi, aka vim, and the method of programming. One could have a assignment that leave the class to explore and change the outcome or multiple outcomes of the program.

Measurement

my irc chat bot was deleted by mistake so here is a quick dummy program.
Lable: loop
objective of program- take the $who command and pipe to $less for display.

change to program: The who command piped into the vi text editor.

lrwxrwxrwx 1 rlott lab46     15 Aug 28 10:37 Maildir -> /var/mail/rlott
-rw-r--r-- 1 rlott lab46    237 Oct 25 14:57 archive1.tar.gz
-rw-r--r-- 1 rlott lab46    584 Oct 25 14:57 archive2.zip
drwxr-x--x 3 rlott lab46     79 Oct 25 15:37 archives
-rw-r--r-- 1 rlott lab46    309 Oct 25 15:42 archives.tar.bz2
drwxr-xr-x 2 rlott lab46      6 Sep 13 08:27 bin
-rw-r--r-- 1 rlott lab46      6 Sep  6 16:19 cake
drwxr-xr-x 2 rlott lab46      6 Sep  6 15:44 cloest
drwxr-xr-x 3 rlott lab46     70 Oct 13 16:10 closet
drwxr-xr-x 2 rlott lab46      6 Sep  6 15:28 coset
-rw-r--r-- 1 rlott lab46    681 Oct 25 21:31 courses.html
lrwxrwxrwx 1 rlott lab46     25 Oct  6 16:47 data -> /usr/local/etc/data/rlott
-rw-r--r-- 1 rlott lab46    752 Sep  6 16:12 e
-rwxr-xr-x 1 rlott lab46     26 Oct  6 15:37 echo.sh
-rw-r--r-- 1 rlott lab46  11221 Oct 25 15:44 ed
drwxr-xr-x 2 rlott lab46   4096 Sep 17 02:14 games
-rwxr-xr-x 1 rlott lab46   6569 Oct 13 16:20 hello
-rw-r--r-- 1 rlott lab46     75 Oct 13 16:20 hello.c
-rw-r--r-- 1 rlott lab46    409 Oct 13 15:41 hello.s
-rwxr-x--- 1 rlott lab46     78 Oct 23 20:07 homepro.sh
drwx------ 3 rlott lab46     16 Oct  6 15:41 irc
"ls-l.txt" 50L, 2632C

Follow your method and obtain a measurement. Document the results here.

Analysis

If i were a little more froggy, the program could be modified to pop up the same as the $motd to display who is on the sever. MAKING LIFE EASY.

Experiments

Visual contdown

Question

can you have the command

 :date +%s 

be placed into a loop script to constantly count up to 23458789… in unix time?

Resources

vim, internet, linux, instruction from course booklet. google - most searching was based off this site.

Hypothesis

Run the bash script while looking for syntax errors. If none the program should be a success. will the script run or will it be a dodo

Experiment

The program runs. yet a error 4 line for is spammed while counting. why!!!

Data

#!/bin/bash
while true
do
date= `date +%s`
     echo "$date"
     sleep 1
done
 echo `date +%s`

Analysis

Based on the data collected: The program did count, forward in time, but the loop applied in the scripting has a continual count time. a error for line 4 was part of the display. all together, much of this experiment was a success.

Conclusions

I need to study more about scripting and program concepts. small errors and the ability to notice are my weak points. I still see bash scripting more fun and easy for windows command line. it“s a little more manual like a standard car.

Experiment 2

Question

can $who command be placed into a text file

Resources

google.com

Hypothesis

If the who command can be placed in the less program, than is should work for the $vi text editor.

Experiment

By simply changing the command named in the syntax out with the vi text editor. The process should be as successful as the first run with the less command.

Data

#!/bin/bash
when= who | vi
        echo "have you seen my base ball"
        echo $WHO
        echo "yes or no"
        exit 0

first run

lab46:~$ ./test
Vim: Warning: Input is not from a terminal
Vim: Error reading input, exiting...
Vim: preserving files...
Vim: Finished.
have you seen my base ball

Analysis

Based on the data collected: The process is different from the last.

Conclusions

Changes must be made to the program in order to have it work. the text file may need additional commands to fulfill the process applied.

Retest

If you're doing an experiment instead of a retest, delete this section.

If you've opted to test the experiment of someone else, delete the experiment section and steps above; perform the following steps:

State Experiment

Whose existing experiment are you going to retest? Prove the URL, note the author, and restate their question.

Resources

Evaluate their resources and commentary. Answer the following questions:

Hypothesis

State their experiment's hypothesis. Answer the following questions:

Experiment

Follow the steps given to recreate the original experiment. Answer the following questions:

Data

Publish the data you have gained from your performing of the experiment here.

Analysis

Answer the following:

Conclusions

Answer the following: