Database System Concepts
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
Bartleby Related Questions Icon

Related questions

Question
  1. Make an array called array with three elements in it, a hashmap /dict / associative array called hash with three elements in it, and a string variable called str with at least 15 characters where one of those characters is duplicated twice (i.e., in the string at least 3 times).

    hint: declare -a array #creates an index array & declare -A hash #creates an associative array

  2. Use echo to print both your arrays (both ‘array’ and ‘hash’) as strings on a single line. (Use loops)

  3. Save just a portion of your indexed array to a new array variable.

  4. Write a loop to print out each item of the new array on a line by itself.

  5. Remove the last element from your indexed array.

  6. Remove the first element from your index array.

  7. Use echo to print out your indexed array on a single line.

  8. Use an if statement to do this: If your array contains 2, print "true" otherwise print "false"

  9. Create a read-only string variable and demonstrate that it cannot be changed.

  10. Echo a substring of str which does not contain the first or last characters of str.

  11. Echo the last bit of str that does not contain the thrice-repeated character from step 1.

  12. Echo every part of str after the first instance of the thrice-repeated character.

  13. Write an expression that echoes the value of an unset variable, but have the parameter expansion replace the unset variable’s value with any value you want and assign the variable to this value.

  14. Echo the now-set variable from 13.

Expert Solution
Check Mark
Knowledge Booster
Background pattern image
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
    Recommended textbooks for you
    Text book image
    Database System Concepts
    Computer Science
    ISBN:9780078022159
    Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
    Publisher:McGraw-Hill Education
    Text book image
    Starting Out with Python (4th Edition)
    Computer Science
    ISBN:9780134444321
    Author:Tony Gaddis
    Publisher:PEARSON
    Text book image
    Digital Fundamentals (11th Edition)
    Computer Science
    ISBN:9780132737968
    Author:Thomas L. Floyd
    Publisher:PEARSON
    Text book image
    C How to Program (8th Edition)
    Computer Science
    ISBN:9780133976892
    Author:Paul J. Deitel, Harvey Deitel
    Publisher:PEARSON
    Text book image
    Database Systems: Design, Implementation, & Manag...
    Computer Science
    ISBN:9781337627900
    Author:Carlos Coronel, Steven Morris
    Publisher:Cengage Learning
    Text book image
    Programmable Logic Controllers
    Computer Science
    ISBN:9780073373843
    Author:Frank D. Petruzella
    Publisher:McGraw-Hill Education