Skip to content

London | 26-SDC-Mar | Ebrahim Beiati-Asl | Sprint 1 | individual shell tools#346

Open
ebrahimbeiati wants to merge 2 commits intoCodeYourFuture:mainfrom
ebrahimbeiati:individual-shell-tools
Open

London | 26-SDC-Mar | Ebrahim Beiati-Asl | Sprint 1 | individual shell tools#346
ebrahimbeiati wants to merge 2 commits intoCodeYourFuture:mainfrom
ebrahimbeiati:individual-shell-tools

Conversation

@ebrahimbeiati
Copy link

@ebrahimbeiati ebrahimbeiati commented Mar 10, 2026

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Individual shell tools exercises

@github-actions

This comment has been minimized.

@ebrahimbeiati ebrahimbeiati added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Mar 11, 2026
@SlideGauge SlideGauge added the Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. label Mar 22, 2026
# TODO: Write a command to output just the names of each player along with the total of adding all of that player's scores.
# Your output should contain 6 lines, each with one word and one number on it.
# The first line should be "Ahmed 15". The second line should be "Basia 37"
awk '{sum = 0; for(i = 3; i <= NF; i++) sum += $i; print $1, sum}' scores-table.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, correct start of the loop from 3 position

# TODO: Write a command to output just the names of each player in London along with the score from their last attempt.
# Your output should contain 3 lines, each with one word and one number on it.
# The first line should be "Ahmed 4".
awk '$2 == "London" {print $1, $NF}' scores-table.txt No newline at end of file

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct usage of NF, like

@SlideGauge SlideGauge added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Mar 22, 2026
@SlideGauge
Copy link

Nice job, review complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants