Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BashGit Lab #3

Open
Akesari12 opened this issue Jul 29, 2020 · 5 comments
Open

BashGit Lab #3

Akesari12 opened this issue Jul 29, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@Akesari12
Copy link
Contributor

In-Class Lab for working with git and bash tools.

@Akesari12 Akesari12 added the enhancement New feature or request label Jul 29, 2020
@Akesari12 Akesari12 self-assigned this Jul 29, 2020
@Akesari12 Akesari12 added this to To Do in Notebook Development via automation Jul 29, 2020
@Akesari12 Akesari12 moved this from To Do to In Development in Notebook Development Jul 29, 2020
@Akesari12 Akesari12 moved this from In Development to Completed Notebooks in Notebook Development Aug 5, 2020
@Akesari12
Copy link
Contributor Author

@EastBayEv , @aculich, getting your eyes on these first two labs would be great! A lot of this is based on D-Lab's BashGit. Any comments/suggestions/corrections welcome. Here's the link: https://github.com/dlab-berkeley/Computational-Social-Science-Training-Program/tree/master/Reproducible%20Data%20Science

Also, if we could follow up about getting the students onboarded to benten or another remote server for the ssh part of the command line, that would be awesome.

@aculich
Copy link
Member

aculich commented Aug 12, 2020

@Akesari12 @EastBayEv continuing the conversation for now in Slack in #curriculum-development

We can use this github issue to document the final answer that we come to in the Slack conversation.

For now, try running the notebooks using this link for the campus datahub:

https://datahub.berkeley.edu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fdlab-berkeley%2FComputational-Social-Science-Training-Program&urlpath=tree%2FComputational-Social-Science-Training-Program%2F&branch=master

@jaeyk
Copy link

jaeyk commented Aug 13, 2020

@Akesari12 I strongly recommend teaching using SSH protocol for git push and pull. It's quicker and safer way to use GitHub.

No longer needs to type id and pw to push and pull.

@jaeyk
Copy link

jaeyk commented Aug 13, 2020

@Akesari12 For the bash part, consider teaching writing and executing a sh file.

an example

#!/bin/sh

#! part called shebang

blah blah

let's say you name the file test.sh

you can make it executable by

$ chmod +x test.sh

chmod = change mode

+x is a file permission parameter and means executable

then you can execute the file by

$ ./test.sh

@jaeyk
Copy link

jaeyk commented Aug 13, 2020

@Akesari12 For the bash, also consider teaching cat, less, and head.

In the following examples, text means any kind of flat file like CSV, TXT, etc.

cat: print a small text file (print everything)
less: print a large text file (you need to enter to scroll down lines)
head: print first n lines in a text file. head -n 1 print first 5 lines in a text file. Note that -n does not mean negative n - indicates a parameter will be followed.

I also use awk, grep, find, and echo a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Notebook Development
  
Completed Notebooks
Development

No branches or pull requests

4 participants