Bash Globs
Bash Globs
Exams Graded
What does a shell do?
Bash scripting
Command string is parsed
$ mv source_file.c destination
Globs/Ranges
Stuff happens
1 char *args[]={
2 "mv",
3 "source_file.c",
4 "destination"
Enter commands 5 };
6 execvp("mv", args);
$ mv source_file.c destination
Globs/Ranges
Stuff happens
1 char *args[]={
2 "mv",
3 "source_file.c",
4 "destination"
Enter commands 5 };
6 execvp("mv", args);
mv file{1..3}.txt dst/
● Special Character: ?
○ ? matches to a, b, c, 1, 2, 3, etc…
● Special Character: *
○ Matches to any number of any character
○ * matches to any string
● Forcelab is out!
● Don’t forget the shebang #!/usr/bin/env bash
● Don't forget to do chmod +x script.sh
● Do not copy message from the pdf, the apostrophes are different!
● Extratation on PowerPoint Turing-Machines!