Beginner needing help writing a simple script!
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have an assignment where I have to write a bash script called "logincount" using the command "last" that takes a list of usernames as its command line arguments and displays on the screen, for each user name, a message in the form of:
Number of times that <username> logged into this machine is <N>
â¨
where (N) is to be replaced by the number of records that the last command output that match (username) exactly.
So for example if you enter "logincount UserX" then the output should be
Number of times UserX logged into this machine is 3.
I do not want it done for me or someone to give me the script write because I want to learn but I would appreciate any advice or hints or help because I am very lost right now, even though it is a simple script.
bash scripting
New contributor
add a comment |Â
up vote
0
down vote
favorite
I have an assignment where I have to write a bash script called "logincount" using the command "last" that takes a list of usernames as its command line arguments and displays on the screen, for each user name, a message in the form of:
Number of times that <username> logged into this machine is <N>
â¨
where (N) is to be replaced by the number of records that the last command output that match (username) exactly.
So for example if you enter "logincount UserX" then the output should be
Number of times UserX logged into this machine is 3.
I do not want it done for me or someone to give me the script write because I want to learn but I would appreciate any advice or hints or help because I am very lost right now, even though it is a simple script.
bash scripting
New contributor
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have an assignment where I have to write a bash script called "logincount" using the command "last" that takes a list of usernames as its command line arguments and displays on the screen, for each user name, a message in the form of:
Number of times that <username> logged into this machine is <N>
â¨
where (N) is to be replaced by the number of records that the last command output that match (username) exactly.
So for example if you enter "logincount UserX" then the output should be
Number of times UserX logged into this machine is 3.
I do not want it done for me or someone to give me the script write because I want to learn but I would appreciate any advice or hints or help because I am very lost right now, even though it is a simple script.
bash scripting
New contributor
I have an assignment where I have to write a bash script called "logincount" using the command "last" that takes a list of usernames as its command line arguments and displays on the screen, for each user name, a message in the form of:
Number of times that <username> logged into this machine is <N>
â¨
where (N) is to be replaced by the number of records that the last command output that match (username) exactly.
So for example if you enter "logincount UserX" then the output should be
Number of times UserX logged into this machine is 3.
I do not want it done for me or someone to give me the script write because I want to learn but I would appreciate any advice or hints or help because I am very lost right now, even though it is a simple script.
bash scripting
bash scripting
New contributor
New contributor
New contributor
asked 7 mins ago
Chaudry Osama
1
1
New contributor
New contributor
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Chaudry Osama is a new contributor. Be nice, and check out our Code of Conduct.
Chaudry Osama is a new contributor. Be nice, and check out our Code of Conduct.
Chaudry Osama is a new contributor. Be nice, and check out our Code of Conduct.
Chaudry Osama is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f475362%2fbeginner-needing-help-writing-a-simple-script%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password