Skip to content

[Bug/Assistance] Fix example code for an os task #185

@hannagabor

Description

@hannagabor

In data/os_interaction/data/dev.json, the example code for task "Find out count of linux users on this system who belong to at least 4 groups." is incorrect. The current example checks for users who belong to exactly 4 groups instead of at least 4 groups.

So instead of this:

  •        "example": "getent passwd | cut -d: -f1 | while read user; do groups $user | cut -d ':' -f 2 | tr -s ' ' | sed 's/^ *//;s/ *$//' | tr ' ' '\\n' | grep -v '^$' | wc -l | grep -q -w '4' && echo $user; done | wc -l"
    

it should be this:

  •        "example": "getent passwd | cut -d: -f1 | while read user; do groups $user | cut -d ':' -f 2 | tr -s ' ' | sed 's/^ *//;s/ *$//' | tr ' ' '\\n' | grep -v '^$' | tr '\\' '\n' | wc -l | grep -q -P '[4-9]|\\d{2,}' && echo $user; done | wc -l"
    

I'm happy to send a PR, but I don't have access to the repo.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions