GradePack

    • Home
    • Blog
Skip to content
bg
bg
bg
bg

GradePack

We have a plain-text data file named stuff.txt in which each…

We have a plain-text data file named stuff.txt in which each line contains a 9-digit long social security number, followed by a single space, a first name of variable length but containing no spaces, another single space, a similarly structured last name, yet another single space, and finally a variable-length single word representing a password.  Provide a way to generate a file stuff-revised.txt in which the last name and first name have been swapped positions.   For instance, the following line from the original file:   555993333 Malfurion Stormrage azeroth  Would be transformed to:   555993333 Stormrage Malfurion azeroth 

Read Details

We want to setup the following hierarchy of folders in our h…

We want to setup the following hierarchy of folders in our home directory (/home/tux/): EDU COP4610 slides videos exercises COP2512 slides videos exercises COP2513 slides videos exercises CIS4930 slides videos exercises CEN6084 slides videos exercises COP3515 slides videos exercises This could take a lot of shell commands. Try to obtain the same results with as small of an effort as possible. Your grade will be commensurate to how much your solution uses the shell syntax to avoid repetitive work. You will also make sure that your command works when invoked from any current working directory.

Read Details

We want to use the whatis tool to figure out what the comman…

We want to use the whatis tool to figure out what the command named foobar does. We know it exists both in sections 3 & 9 of the manual so we’d like to specify for whatis to only look into section 9. The textbook mentions that man -f or whatis can not be that specific but the whatis tool is actually able to let you specify a section number. Which of the following syntax will allow you to do so?

Read Details

The file /usr/share/dict/words holds a list of English words…

The file /usr/share/dict/words holds a list of English words. We want to use egrep to display only those which match the following rules;  The word has tow or more quote symbol ‘ in it Each quote symbol is followed by one or more character The word should not start with a quote symbol ‘ In addition; we are working with Ubuntu Linux on the bash shell using GNU egrep tool Here are some examples of the words which will be matched; bo’s’n bo’s’n’s bo’s’ns Which of the following is the best solution?

Read Details

We want to use the ls command to list all the files from the…

We want to use the ls command to list all the files from the current working directory which names match the following pattern:  if the filename starts with a letter (lower or upper case) it is followed by 3 characters: a digit, an uppercase letter, and a lower case letter. Else it is followed by 5 characters: a digit, any character, an upper case letter, any character, and a lower case letter. Provide a single ls command that will list the above-described files in the current working directory.  

Read Details

Which two sections of the man pages are searched by the apro…

Which two sections of the man pages are searched by the apropos command?

Read Details

You already know what a palindrome is by now :)  We want to…

You already know what a palindrome is by now 🙂  We want to use egrep on one of the Linux dictionaries files, located at /usr/share/dict/american-english, in order to identify palindromes that are more than one letter-long and UP TO 5 letter-long (inclusive). 

Read Details

We have a plain-text file named persons-of-interest.txt. It…

We have a plain-text file named persons-of-interest.txt. It contains several fields, each separated from the next by a single space. Within each field, no space character is used. The first field is a first name, the 2nd a last name, and the 3rd an optional variable-length integer called the Jedi Extensive Directory Identifier (J.E.D.I.).  Another file, named mc.txt contains only two fields. The first one is a J.E.D.I. number, and the second a decimal number representing the midi-chlorian count of the corresponding individual.  Provide command lines allowing us to display only the last name and midi-chlorian count of any individual who has a J.E.D.I. number.   Provide another command line allowing us to display only the first and last name of anyone who does not have a J.E.D.I. number. 

Read Details

I want to count the words from one of the Linux dictionaries…

I want to count the words from one of the Linux dictionaries files, located at /usr/share/dict/american-english, that contain two successive vowels.

Read Details

This is the third time that I accidentally hit both the CONT…

This is the third time that I accidentally hit both the CONTROL and D keys on my keyboard and close my terminal. I want to make sure this does not happens anymore during my bash session. How do I do this? How would I go about making this change permanent for all my login bash shells? What if I wanted to make this change permanent only for my non-login bash shells?

Read Details

Posts pagination

Newer posts 1 … 37,428 37,429 37,430 37,431 37,432 … 78,881 Older posts

GradePack

  • Privacy Policy
  • Terms of Service
Top