Note: The default ITS GitLab runner is a shared resource and is subject to slowdowns during heavy usage.
You can run your own GitLab runner that is dedicated just to your group if you need to avoid processing delays.

Commit de9dfdf2 authored by Rachel D Frenkel's avatar Rachel D Frenkel
Browse files

week 3 submission

parent 1a71943c
No preview for this file type
w2 @ 5a677429
Subproject commit 5a677429f2a86fb7f18c67b374cac77bed49acbf
run: hello.c
gcc -g -Wall -o hello hello.c
./hello
Hello World!
\ No newline at end of file
#!/bin/bash
gcc -g -Wall -o hello hello.c
./hello
echo
./hello > comp.txt
echo -n "Hello World!" > ans.txt
if ( diff -q comp.txt ans.txt ); then
echo "All tests passed"
else
echo -n "Test failed. Expected >>Hello World!<<, got output >>"
cat comp.txt
echo "<<"
fi
rm -rf ans.txt
Hello World!
\ No newline at end of file
# EECS 201 HW 3
uniqname: your_uniqname_here
## Question 1
``` 1
Commands like "ls" and "nano" didn't work even when I had a file in the directory and tried to write into it.
```
## Question 2
``` 2
Yes we can still run this with an empty path and it has the same affect.
```
## Question 3
``` 3
A command that still works is "pwd" because it has to do with the location of the terminal.
```
## Question 4
``` 4
$? returns the result of the last executed command. This is useful to use echo $? if a result was not printed to the terminal.
```
## Question 5
``` 5
$1 returns the command at the 1 index of the last command line entry. This is good to break up the command line arguments.
```
## Question 6
``` 6
#!/bin/bash
gcc -g -Wall -o hello hello.c
./hello
echo
./hello > comp.txt
echo -n "Hello World!" > ans.txt
if ( diff -q comp.txt ans.txt ); then
echo "All tests passed"
else
echo -n "Test failed. Expected >>Hello World!<<, got output >>"
cat comp.txt
echo "<<"
fi
rm -rf ans.txt
```
## Question 7
``` 7
To add to the PATH= every time the terminal is opened, edit the .bash_rc or .bash_profile (whichever the computer has) and add PATH= right into the profile then export PATH.
```
### Question 8
``` 8
1-2 hours
```
File added
#include <stdio.h>
int main() {
printf("Hello World!");
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.hello</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment