Tools Flashcards
Libraries:
Static Linking
vs
Dynamic Linking
- Static Linking
- Every routine needed from the library is included in the executable file
- Routines are PART OF the program
- Dynamic Linking
- References to library routines are left to resolve during execution
- Library objects not loaded until they are needed at runtime
Libaries:
What are
“Shared Libraries”?
Libraries that are prepared for
Dynamic Linking
These are also called
Dynamic Linking Libraries (DLLs)
Shell Scripts:
Overview
- A shell script is just a sequence of shell commands
- Stored in an executable text file
- The “x” bit in the file permissions must be turned on with “chmod”
- The shell finds programs by looking for executable files in the path ( $PATH )
Shell Utility Toolkit:
Basic
Line Oriented Processing Tools (8)
- grep
- find patterns
- sed
- edit lines
- cut
- extract columns
- sort
- sort lines into specified order
- uniq
- display unique lines in a sorted file
- tail
- display last lines of a file
- head
- display fist lines of a file
- wc
- count words, lines or characters
Shell Utility Toolkit:
grep
- Grep is used to find lines or patterns in text
- Use:
- grep [-e pattern]
- This will output any lines that contain any of the patterns
Shell Utility Toolkit:
sed
- Used to edit/rewrite lines within the text
- Use:
- sed [-e action]
- Copies input to output, performing all actions on each line
- Possible Actions
- Delete: /pattern/d
- Delete line if pattern found
- Read: /pattern/r
- Read file after the line where pattern occurs
- Replace: s/pattern/replace/g
- Substitute “replace” at occurrences of “pattern”
- Delete: /pattern/d
Shell Utility Toolkit:
cut
Extract the columns of text
Shell Utility Toolkit:
sort
Sort lines of text into a specified order
Shell Utility Toolkit:
uniq
Display unique lines in a sorted file
Shell Utility Toolkit:
tail
Display the last lines of a file
Shell Utility Toolkit:
head
Display the first lines of a file
Shell Utility Toolkit:
wc
Counts words, lines or characters in text
Shell Utility Toolkit:
File System
Manipulation Tools (8)
- cp - copy
- mv - move
- rm - remove
- ls - list
- chmod - change file access modes
- chown - change file owner
- find - navigate directory structure, testing files for attibutes
- touch - change last-modified time on a file to current
Shell Utility Toolkit:
Miscellaneous Tools (5)
- echo - echo arguments on stdout
- cat - copy a file, or files, to stdout
- tr - translate characters
- date - echo current date and time
- man - see manual page of a command
Shell Utility Toolkit:
Scripting Languages
In addition to simple shell scripts:
- awk
- Process files based on
- rich pattern matching
- text manipulation
- Process files based on
- perl
- Works similarly, but with more c-like facilities