computing-systems-212 / Unix Basics Demo / task4-editing / task4.txt
task4.txt
Raw
danial27@ssh-linux4:~$ cp -r ~cpen212/Public/hello ~
danial27@ssh-linux4:~$ ls
cpen211  cpen212  hello
----------------------------------------------------------------------------------

danial27@ssh-linux4:~$ nano hello/src/main.rs

^W allows you to search for a string
^\ allows you to replace a string with another string (Y to do once and A to do recursively)
----------------------------------------------------------------------------------

danial27@ssh-linux4:~$ cat hello/src/main.rs
use std::env;

fn main() {
    let args: Vec<String> = env::args().collect();
    if args.len() < 2 {
        println?("Goodbye, CPEN 212?");
    } else {
        println?("Goodbye, {}?", args[1..].join(", "));
    }
}
----------------------------------------------------------------------------------