Skip to content
  • Home
  • CCNA Labs
    • CCNA 1 LAB Activities (v6 & v7)
    • CCNA 2 LAB Activities (v6 & v7)
    • CCNA 3 LAB Activities (v6 & v7)
    • CCNA 4 Lab Activities
  • Linux
    • Linux Unhatched
    • Linux Essentials 2.0
    • Linux Essentials
    • Introduction to Linux I
    • Introduction to Linux II
  • Programming
    • PCAP – Programming Essentials in Python
    • CLA – Programming Essentials in C
    • CPA Programming Essentials in C++
  • About
    • Contact Us
    • Privacy Policy

CCNA 7 Exam Answers 2023

Go with our CCIE, Passed 100%

  • ITE
    • ITE - IT Essentials v7.0
    • ITE - IT Essentials v6.0
      • IT Essentials Lab 2019
    • ITE v5.0 Exam
    • Virtual Activity Laptop
    • Virtual Activity Desktop
  • NE
    • MF
  • CCNA
    • CCNA1
      • CCNA1 v7.0 – ITN
      • CCNA1 v6.0
    • CCNA2
      • CCNA2 v7.0 – SRWE
      • CCNA2 v6.0
    • CCNA3
      • CCNA3 v7.0 – ENSA
      • CCNA3 v6.0
    • CCNA4
      • CCNA4 v6.0
  • Cyber-Security
    • ITC – Introduction to Cybersecurity 2.1 (Level 1)
    • CE – Cybersecurity Essentials 1.1 (Level 2)
    • CCNA CyberOps 1.1 (Level 3)
  • Security
    • CCNA Security v2
  • DevNet
  • CCNA PT Lab 2023

Linux Essentials Chapter 9 Exam

Last Updated on May 20, 2021 by Admin

Linux Essentials Chapter 9 Exam Answer

  1. Question ID 117

    The echo command:

    • Is used for variable assignment
    • Duplicates the input stream to the output stream
    • Is used to output text to the console
    • Tests a variable for duplication
    • Copies variables from one to another
  2. Question ID 118

    A file begins with #!/bin/csh. This means:

    • Nothing, this is a comment
    • C Shell compatibility mode is enabled
    • The operator should not be using /bin/csh
    • Running the script will invoke /bin/csh to interpret the rest of the file
    • This is a Perl script
  3. Question ID 119

    Which are appropriate editors for writing shell scripts?

    (choose two)

    • /bin/bash
    • vi
    • LibreOffice Writer
    • Firefox
    • nano
  4. Question ID 120

    Most of nano’s commands take the form of:

    • Control and another character
    • Alt and another character
    • Mouse clicks
    • The F1 through F12 function keys
    • Escape followed by another character
  5. Question ID 121

    What does this shell script do?

    FOO=/tmp/foo

    if [ ! –d $FOO ]; then

    mkdir $FOO

    fi

    • Creates /tmp/foo if it does not exist
    • Makes the /tmp/foo directory if a file by that name exists
    • Outputs a message to the screen
    • Creates /tmp/foo and raises an error if there is a problem
    • Nothing, since there is a problem with the conditions in the if statement
  6. Question ID 123

    Which of the following are correct about for and while loops?

    (choose two)

    • for loops operate over a fixed list of items
    • while loops operate over a fix list of items
    • for loops have a test each cycle to determine if it should run again
    • while loops have a test each cycle to determine if it should run again
    • for loops require a variable over which to iterate
  7. Question ID 124

    Given the following part of a script:

    if [ -f $1 ]; then

    echo “I am here”

    fi

    • What is the meaning of $1?
    • It is a special variable that indicates the exit code of the command before it
    • It is the first argument passed to the script
    • It is a file called $1
    • It is a parameter to –f, indicating the size of the file
    • It is a list of files that gets interpolated
  8. Question ID 125

    Given the following script that is run through ./test.sh hello goodbye

    if [ -f $2 ]; then

    echo “I am here”

    fi

    • When will “I am here” be printed?
    • If there are two files in the current directory
    • The script will always print “I am here”
    • Never
    • If a file called “hello” exists in the current directory
    • If a file called “goodbye” exists in the current directory
  9. Question ID 126

    What is the correct way to assign the word “Hello” to a variable?

    • $A=”Hello”
    • echo “Hello” > A
    • A=”Hello”
    • echo $A “Hello”
    • A = “Hello”
  10. Question ID 127

    What is the correct way to save the current directory to a variable?

    • A=`pwd`
    • A=pwd
    • A=cwd
    • pwd $A
    • pwd | $A
  11. Question ID 128

    Which shell command accepts input from the user’s keyboard?

    • echo
    • $1
    • read
    • input
    • gets
  12. Question ID 129

    What information is held inside $? ?

    • The current process id
    • The number of arguments passed to the script
    • The current user ID
    • The previous command’s exit code
    • The name of the command run
  13. Question ID 130

    How would you finish your script with an exit code of 42?

    • return 42
    • $?=42
    • CODE=42
    • exit 42
    • break 42
  14. Question ID 131

    The if command looks for what exit code to consider a condition to be true?

    • 10
    • 255
    • 0
    • 1
    • 8
  15. Question ID 132

    The number of users logged in is in a variable called USERS. How would you test to see if 5 users are logged in?

    • test –f USERS=5
    • test $USERS = 5
    • test $USERS,5
    • test $USERS –eq 5
    • test $USERS –a 5
  16. Question ID 133

    Given the following script:

    while [ ! –f /tmp/foo ]; do

    echo –n “.”

    process_data > /tmp/foo

    done

    Which of the following are true?

    (choose two)

    • If a file called /tmp/foo exists, process_data won’t be run
    • The screen will fill with dots.
    • /tmp/foo will be removed if it exists
    • process_data will never be run
    • process_data will be called at most once
  17. Question ID 134

    A conditional that lets you make multiple comparisons with a pattern is called:

    • case
    • fanout
    • if
    • test
    • branch
  18. Question ID 135

    What is the meaning of $(( $i + 1)) ?

    • 1 will be added to the i variable
    • This will return the value of the next argument to the script
    • This runs the command stored in variable i
    • If i is 0, the loop will stop
    • This will return the value of the first argument to the script
  19. Question ID 136

    How would you write a test that says “if /tmp/foo is a directory or USERS is greater than 5”?

    • test –d /tmp/foo | $USERS > 5
    • test –f /tmp/foo –o $USERS –ge 5
    • test –d /tmp/foo –o $USERS –gt 5
    • test /tmp/foo || $USERS > 5
    • test /tmp/foo –d –o $USERS -gt 5
  • CCNA1 v7
  • CCNA2 v7
  • CCNA3 v7
System Test Exam Answers
Modules 1 – 3 Exam Answers
Modules 4 – 7 Exam Answers
Modules 8 – 10 Exam Answers
Modules 11 – 13 Exam Answers
Modules 14 – 15 Exam Answers
Modules 16 – 17 Exam Answers
Practice Final – ITN Answers
Course Feedback
ITN Practice PT Skills Assessment (PTSA)
Final Exam Answers
Modules 1 – 4 Exam Answers
Modules 5 – 6 Exam Answers
Modules 7 – 9 Exam Answers
Modules 10 – 13 Exam Answers
Modules 14 – 16 Exam Answers
ITN Practice Skills Assessment – PT Answers
SRWE Practice Skills Assessment – PT Part 1 Answers
SRWE Practice Skills Assessment – PT Part 2 Answers
SRWE Hands On Skills Exam Answers
SRWE Practice Final Exam Answers
SRWE Final Exam Answers 
Modules 1 – 2 Exam Answers
Modules 3 – 5 Exam Answers
Modules 6 – 8 Exam Answers
Modules 9 – 12 Exam Answers
Modules 13 – 14 Exam Answers
ITN Practice PT Skills Assessment (PTSA) Answers
SRWE Practice PT Skills Assessment (PTSA) – Part 1 Answers
SRWE Practice PT Skills Assessment (PTSA) – Part 2 Answers
ENSA Practice PT Skills Assessment (PTSA) Answers
ENSA Hands On Skills Exam Answers
Practice Final – ENSA Answers
ENSA Final Exam Answers
CCNA Certification Practice Exam Answers

Copyright © 2023 PressExam.