NW | 2026-mar-sdc | Zabihollah Namazi | Sprint 2 | shell pipelines#385
NW | 2026-mar-sdc | Zabihollah Namazi | Sprint 2 | shell pipelines#385ZabihollahNamazi wants to merge 4 commits into
Conversation
SlideGauge
left a comment
There was a problem hiding this comment.
Could you adjust settings of your editor? All the scripts does not have trailing new line
|
|
||
| # TODO: Write a command to output the names of the files in the sample-files directory whose name starts with an upper case letter and doesn't contain any other upper case letters. | ||
| # Your output should contain 7 files. | ||
| ls sample-files | grep '^[A-Z][a-z]*$' # [a-z]* = zero or more lowercase after that , $ = end of this line grep No newline at end of file |
There was a problem hiding this comment.
Will this regex pass such a filename as "File2.txt"?
There was a problem hiding this comment.
no it doesnt and i fix it which is
[^A-Z]*$ zero or more letter after that first uppercas which is not upper case
thanks
|
|
||
| # TODO: Write a command to count the number of files in the sample-files directory whose name starts with an upper case letter and doesn't contain any other upper case letters. | ||
| # Your output should be the number 7. | ||
| ls sample-files | grep -c '^[A-Z][a-z]*$' # -c to count lines No newline at end of file |
There was a problem hiding this comment.
no it doesnt and i fix it which is
[^A-Z]*$ zero or more letter after that first uppercas which is not upper case
thanks
| # The input for this script is the events.txt file. | ||
| # TODO: Write a command to show how many times anyone has entered and exited. | ||
| # It should be clear from your script's output that there have been 5 Entry events and 4 Exit events. | ||
| awk '{print $1}' events.txt | sort | uniq -c No newline at end of file |
There was a problem hiding this comment.
Good catch of Entry/Exit events via $1
|
Good job, just a couple of notes from me to fix please |
|
Closing PR because the SDC run has finished. Feel free to re-open if you're still working on it. |
Self checklist
Changelist
shell pipeline exercises are done and please if you could check them , thanks