# 2024-03-19-NCL Unix Shell ### This document: # https://hackmd.io/@rseteam-ncl/2024-03-19-NCL Click the `Edit` button to edit this document. Please scroll down and add your name below the `Attendance` heading. ### JupyterHub: # [https://172.167.248.222/](http://172.167.248.222/) **We asked for your uni login when you registered. Please use that to login - it is <span style="color:red;">case sensitive</span>. You don't have a password yet. The password you enter the first time you log in will become your password.** ## Getting the data we need for today: In a terminal (bash shell) ```bash wget https://swcarpentry.github.io/shell-novice/data/shell-lesson-data.zip unzip shell-lesson-data ``` ### Links: - What is The Carpentries [carpentries.org](https://carpentries.org) - Who and what is the RSE Team? [https://rse.ncldata.dev/](https://rse.ncldata.dev/) - What is live coding? One of the cornerstones of The Carpentries teaching is live coding: instructors do not use slides to teach coding, but work through the lesson material, typing in the code or instructions, with the workshop participants following along. - [Code of Conduct](https://docs.carpentries.org/topic_folders/policies/code-of-conduct.html) - [Workshop website](https://nclrse-training.github.io/2024-03-19-NCL/) - [Link to lesson website](https://swcarpentry.github.io/shell-novice/) - [Link to data](https://swcarpentry.github.io/shell-novice/data/shell-lesson-data.zip) - [Pre-workshop survey](https://carpentries.typeform.com/to/wi32rS?slug=2024-03-19-NCL) - [Post-workshop survey](https://carpentries.typeform.com/to/UgVdRQ?slug=2024-03-19-NCL) - [Code Community](https://teams.microsoft.com/l/channel/19%3AG79Rz7Mhk6rC0mhia04YCD-nj7WabLMxhnyb1YLp04A1%40thread.tacv2/General?groupId=7059214c-2200-4ad6-a739-9d350c74c7a9&tenantId=) - [What is Unix slides](https://docs.google.com/presentation/d/1f_jYuVjMfkOwJ1dhyZ9uFxyen8fV8Y3LBDX1icQ5syQ/edit#slide=id.g2c41e569668_0_8) ### Attendance: ## Please sign in using your <span style="color:red">university email</span> and your <span style="color:red">name</span>: 1. u.s.b.roeslan1@newcastle.ac.uk, Syaziah Roeslan 3. c2059238@newcastle.ac.uk, Sofia Sorbet 4. E.Collinson@newcastle.ac.uk, Ethan Collinson 6. G.Trifonov3@newcastle.ac.uk, Georgi Trifonov 7. t.w.boughen1@newcastle.ac.uk, Thomas Boughen 8. e.dimmick2@newcastle.ac.uk, Ellie Dimmick 10. rachel.smith4@newcastle.ac.uk, Rachel Smith 11. c.k.ng2@newcastle.ac.uk, CHI KIT NG 12. D.Yu10@newcastle.ac.uk, Dahui Yu 13. H.Harper-Gardner2@newcastle.ac.uk, Henry Harper-Gardner 14. d.d.basil2@newcastle.ac.uk 15. a.kumar7@newcastle.ac.uk, Amrit Kumar(Helper) 16. s.r.sharma2@newcastle.ac.uk, Sneha Sharma 9. d.dysen2@ncl.ac.uk, Denis Dysen (helper) Answers: 3 3 1 1 findPIPELINE READING COMPREHENSION Write a short explanatory comment for the following shell script: `wc -l $(find . -name "*.dat") | sort -n` Outputs number of lines all .dat files in the current directory and sorts them numerically Lists the number of lines in .dat files in ascending numerical order Outputs the number of lines in all the .dat files and then returns the count after sorting numerically. Finds all .dat files, counts number of lines on each and sorts them numerically