This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
blog:spring2016:mpotapen:journal [2016/03/01 04:21] – [Week 5] added stuff mpotapen | blog:spring2016:mpotapen:journal [2016/05/11 15:51] (current) – mpotapen | ||
---|---|---|---|
Line 113: | Line 113: | ||
The in class examples concerned counting the number of files with certain attributes in their names. By using ls in combination with the wildcard characters and then piping (or if you're in on this joke, passing the joint) to wc you count files based on their file names. For example the command | The in class examples concerned counting the number of files with certain attributes in their names. By using ls in combination with the wildcard characters and then piping (or if you're in on this joke, passing the joint) to wc you count files based on their file names. For example the command | ||
+ | <cli> | ||
+ | lab46: | ||
+ | </ | ||
+ | returns the number of files that have file names of exactly three characters. The command | ||
+ | <cli> | ||
+ | lab46: | ||
+ | </ | ||
+ | |||
+ | Returns the number files with at least three characters in their file name. I wonder if there' | ||
+ | |||
+ | ====A Variety of Things About Linux in General==== | ||
+ | |||
+ | Matt talked about the environment variable $PATH. $PATH tells the computer which directory to search through when trying to match what's in STDIN with possible commands. When typing ls, for example, and pressing enter, the computer will search through the directory specified by $PATH and see if it finds a file called " | ||
+ | |||
+ | Matt also mentioned that starting a file name with " | ||
+ | |||
+ | | Ctrl key |Function| | ||
+ | |c|exits process| | ||
+ | |d|exits process more nicely| | ||
+ | |h|backspace| | ||
+ | |j|enter| | ||
+ | |l|clear screen| | ||
+ | |a|move cursor to start of command line| | ||
+ | |e|move cursor to end of command line| | ||
+ | |k|kill command from the cursor to the end of the command line| | ||
+ | |s|transmit off| | ||
+ | |v|ctrl character escape| | ||
+ | |w|cut| | ||
+ | |y|paste| | ||
+ | |||
+ | |||
+ | ====Week 6==== | ||
+ | |||
+ | ===Killing Things=== | ||
+ | |||
+ | This week Matt taught us how to kill things like a ninja. The Unix operating system supports various signals that can be sent to programs. I've had some experience with signals when programming with the gtk package in my previous adventures in which I attempted to create windowed programs. The code must be written in order to handle the signals and act on them properly. In Unix, there are 64 signals that can be sent to programs and many of them kill the program by default. Again, it depends on how the program is written to handle those signals. Signals can be sent using the kill command. "kill -l" lists all 64 signals. | ||
+ | |||
+ | SIGHUP, number 1 on the list, stands for signal hang up. Hanging up on a stopped process results in the termination of that process. SIGINT, for Signal interrupt, is what is sent out when one presses the control c key. SIGILL generally gets sent out in the event of an illegal operation being performed. SIGTRAP is similar to SIGINT. SIGKILL is the agent 47 of kill signals. It never fails. SIGSTOP sends a stop signal to programs and when followed with a SIGCONTINUE effectively backgrounds the program. SIGSEGV is the signal sent out to kill programs that are seg faulting. | ||
+ | |||
+ | ===Scripting=== | ||
+ | Typing commands into the command line and watching the computer do your work for you while you laugh maniacally and pet your cat is all well and good, but isn't there sometimes even more efficient ways to implement your evil plans? The answer is "yes, scripting" | ||
+ | |||
+ | There are some trick that Matt taught us about scripting. Curly braces isolate variable names in situations where the computer may misunderstand whether you are referring to a variable or the string you assigned to the variable name. Bash isn't really meant to complex calculations but it does have a command called " | ||
+ | |||
+ | < | ||
+ | [" | ||
+ | </ | ||
+ | |||
+ | compares the value of the " | ||
+ | |||
+ | < | ||
+ | for ((x=0; | ||
+ | echo "x is $x" | ||
+ | done | ||
+ | </ | ||
+ | |||
+ | It's generally considered good practice to end scripts with an exit 0 command. | ||
+ | |||
+ | ===HTML=== | ||
+ | This week's project involved the use of HTML to create web pages and as a result was my first use of HTML. I learned a lot in the short time that I used it. HTML is used to toggle various properties of web pages (font of text, buttons, images) on and off. HTML works with tags that are placed around the object you want to toggle the property of. For example the < | ||
+ | |||
+ | I also ran into CSS, which is a product of the modern internet that people use within HTML code to gain further functionality and organization. For example with out the css command " | ||
====MONTH Day, YEAR==== | ====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. | + | 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: | As an aid, feel free to use the following questions to help you generate content for your entries: | ||
Line 126: | Line 188: | ||
* What concepts are you dealing with that may not make perfect sense? | * What concepts are you dealing with that may not make perfect sense? | ||
* What challenges are you facing with respect to the course? | * What challenges are you facing with respect to the course? | ||
- | |||
- | |||