a BASH command that concatenates the value of the variable FILENAME with the value of the variable name EXTENSION, sorts the lines of the resulting concatenated filename (assume it is a plain text file), and displays the sorted lines to stdout
Q: Write a BASH command that removes the LOCALHOST variable
A: unset is the keyword used to remove or clear any variables
Q: How do I write a script in bash on Mac that prompts the user for a filename with path. Test if the…
A: How do I write a script in bash on Mac that prompts the user for a filename with path. Test if the…
Q: You have modified the /etc/aliases file to include a new e-mail alias. However, when yousend e-mail…
A: Modifying the alias file After the modification to the file, then the command for new alterations…
Q: Write a complete bash script that takes a filename as input using the read command. The script first…
A: #!/bin/bash read filenameif [ -e "$filename" ]then echo "File exists"else echo "File…
Q: Write a bash script that will create another bash script and run it, the newly generated bash script…
A: Here as like you asked i am only creating a bash script that will create another bash script
Q: Consider the following access rights of file run.sh -rw-r-r- 1 luk dev 5 May 7 15:08 run.sh 1.…
A: Dear Student, The first digit in the 3digit numeral is to give permission to the file owner, the…
Q: Consider the following interaction with shell $ myapp -bash: myapp: command not found Further, the…
A: Third option of the question is most correct. In unix operating system, whenever we enter a command…
Q: Create a simple BASH shell script that executes the commands specified by you, using a number of…
A: Bash (also known as Bourne Again Shell) is an interpreter for shell commands. A shell interpreter…
Q: Write a bash script that will copy all the .cc, .cpp, .c, and .h files to user defined folder, whose…
A: The following bash script copy all the .cc, .cpp, .c and .h files in the current directory to…
Q: What are the permission of file01 after executing this command? chmod 777 file01 الاجابات…
A: chmod 777 file01 will give read, write, and execute permissions to everyone. 7 means rwx so for
Q: Write a bash script that would reside in the test directory, would take an integer as its sole…
A: Write a bash script that would reside in the test directory, would take an integer as its sole…
Q: Write one or more bash commands to perform the following tasks. You may assume that each part of the…
A: echo #!bin/bash >> Question2.sh echo Name ID >> MyDetails.txt wc -w MyDetails.txt
Q: [test50@cents ~]$ touch ownFile [test50@centos ~]$ ls -1 ownFile |-rw-rw-r--. 1 test50 test50 0 Nov…
A: touch command is used to create a file ls command is used to list the directory and its content ls…
Q: After typing the command umask 731, the permissions on all subsequently created filesand directories…
A: Permissions: In Linux operating system, the permissions are written in the format where, The…
Q: Create your own .bashre file that sets various variables and aliases. Log out and back in again…
A: Output of the bash script
Q: a BASH command that converts the shell variable LOCALHOST into an environment variable
A: Bash is the shell, or command language interpreter, for the GNU operating system. The name is an…
Q: Write a Bash script that removes all zero length ordinary files in the directory (including those in…
A: Write a Bash script that removes all zero length ordinary files in the directory (including those…
Q: 2. With HW1Directory as the working directory, give the output of each of the following commands…
A: Note: since your question contain multiple sub-parts but we can answer only 3-sub part at a time…
Q: Question 7 Let us assume that we run the following command in the bash shell: ps ef grep 1909 The…
A: The following can be concluded from the given PID and PPID: Option 2 is True because the ppid of…
Q: Explain briefly the following commands a. keytool -genkey -alias sdo -keyalg RSA b. keytool…
A: a) keytool -genkey -alias sdo -keyalg RSA Generate Key Use this method if you want to use HTTP (HTTP…
Q: Write a bash script that will run the command getData1.sh and getData2.sh to read values from two…
A: How to open/import a text CSV file One can read comma separated CSV file. Start calc Choose File…
Q: Use following variables to write your CV in Linux bash script. Variable Script Output $0…
A: Save the file with name test.sh and execute using $./test.sh John Doe
Q: Explain how a bash executes a command , say ls -l . in 3-4 sentences ?
A:
Q: Consider the file scriptfile with the following permissions: rwxr-xr—- Who can run each of the…
A: The, given information is: USER GROUP OTHER $ source scriptfile $…
Q: Below is a sequence of shell commands that we typed into a bash terminal window on a Linux machine…
A:
Q: Write a bash script to print out the output as such “DCS1106 Lab is all…
A: A Bash script is a plain text file that contains a series of commands. These commands are a mixture…
Q: Write the BASH commands that accomplish the following tasks: 1) Display the name of the current…
A: 1.echo "$SHELL" or echo $SHELL (without double quotes also 2.chsh --list-shell or chsh -l 3.history…
Q: Write the BASH commands that accomplish the following tasks: 1) Display the name of the current…
A: Since you have asked multiple questions, according to the company's policy we will solve the three…
Q: script
A: Given :- It is given that the two files, almost identical text files (only a few bits are flipped…
Q: Write a bash script that will run the command getReading1.sh and getReading2.sh to read values from…
A: Below is the solution;
Q: What is the output of the following shell command? 180 080 0:0 0:0 0: cat data.csv | awk -F (print…
A: Answer:- Correct Option is b. the number of lines in the file data.csv
Q: Write a BASH command to assign the string "/usr/share/data" to an environment variable called…
A: Environment variable Environment variables are the variables that do have an effect on how processes…
Q: Write a bash program that takes in a word and a filename from the command line and print out the…
A: so bash program is given below for above given instructions
Q: Write a bash shell script that will enter the marks of a student and decide whether he has “passed”…
A: Hi. Let's move on to the script in the next step. I have included comments that will help you in…
Q: Write a Bash script that removes all zero length ordinary files in the directory (including those in…
A: Step 1 The answer is given in the below step
Q: Which of the following UNIX command can be used in symbolic mode to grant the following permissions…
A: r = read w =write x =executer - sign indicates that particular permission has been removed b…
Q: Write a grep command using a single pipe to find all lines that contain the string raise taxes in…
A: Command: 1. grep "raise taxes" SurveyData | head -n 1 Output:
Q: We want a Bash script which will take a list of usernames on the command line and print out which of…
A: Answer(A):- Works as is Explanation:- The code is correct and list name of currently logged in…
Q: a. Write a command to install the package ABCD by using rpm. b. Write a command…
A: Note: Since we only answer up to 3 sub-parts, we’ll answer the first 3. Please resubmit the question…
Q: how to create a bash script that unzip several zipped files in a folder and sort them alphabetical…
A: Please check the step 2 for solution
Q: Write a complete Bash script that takes as input a file named myfile and searches for the lowest…
A: Hi, PFB the script code for the given problem. Put this code into a file (Let's say script.sh) awk…
Q: Write a short bash script to count the number of blank lines in a file or from stdin. you are not…
A: A utility of the Linux OS are linux commands. All operations are often through with the assistance…
Q: We want a Bash script which will take a list of usernames on the command line and print out which of…
A: Bash scripts are the set commands that are written in a text plain file. Thou, we can directly write…
Q: What are two ways you can execute a shell script when you do not have execute permission for the…
A: Actually, script is a program or sequence of instructions.
Q: (without using grep). For example, File 1 contains: 1 2 4 6 File 2 contains: 1 2 89 6 7…
A: Lets see the solution.
Q: Explain what the effect of each of the following commands would be if entered at the Bash prompt? Be…
A: As per our guidelines, we are supposed to answer only 1st three parts. Kindly repost the remaining…
Q: Write two scripts called encryption and decryption. Test both scripts by encrypting a file called…
A: TO ENCRYPT A SCTIPT : * open the script that you want to encrypt. *Select Edit>Encrypt script.…
Q: Write a bash script that accepts aperson’s name as a command-line argument and simply prints out the…
A: #!/bin/bash if [ "$1" != "" ]; then #checking if command line is empty if not printing greetings…
Q: On the cmsy255 server, write a bash shell script called usrinfo that displays information about a…
A: #!/bin/bash # First in order to make the script executable give executable permission to the script.…
Write a BASH command that concatenates the value of the variable FILENAME with the value of the variable name EXTENSION, sorts the lines of the resulting concatenated filename (assume it is a plain text file), and displays the sorted lines to stdout.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
- Using the following data file (delimited by a space or tab) November 400January 200June 400March 200April 200May 300July 400August 300September 400February 300October 300December 200Write a bash script that will use a loop structure to process the data file line by line. Do not use the command awk. The script will send the output to a file in the following format:Month Sales-------- -------January 200February 300March 200April 200May 300June 400July 400August 300September 400October 300November 400December 200======Total show the totalAverage show the averageEnter a BASH glob pattern that will match all files with 7-character names that end with ‘.txt’, start with the letter ‘c’ and the third letter of ’t’. All there isEnter a BASH "glob" pattern that will match all files in the current working directory that start with the letter 'q'. Note: no "whitespace" is permitted (spaces, tabs, etc).
- Select all of the following Bash filename patterns that would only match the following filenames (i.e., no other files except these four could ever be matched by the chosen pattern(s)): syscore5a.bin syscore5b.bin syscore9b.bin syscore9a.bin O syscore (5,9) {a,b).bin O syscore{519} {a|b}.bin O syscore [59] (a, b}.bin O syscore [519] [alb].bin O syscore [59ab].bin O syscore [59] [ab].bin O syscore [5, 9] [a,b].bin O syscore (5,9}[ab].binWrite the command taht will locate all files that have the suffix/extension of ".py". For each file that is located, the command should append the suffix/extension of ".backup" to the file. So, if a file had the name "one.py", its new name would be"one.py.backup".Bash Shell Scripting – Misc. Commands Create a bash script ~/test4.sh with any text editor. Write a bash script that does the following: echo "File Name: $0" echo "First Parameter : $1" echo "Second Parameter : $2" echo "Quoted Values: $@" echo "Quoted Values: $*" echo "Total Number of Parameters : $#" Take a screenshot of the console output. Run your scripts after doing a chmod 777 on the script. Open a terminal window and run the following commands: which gcc man gcc
- Your very own .bashrcfile Create your own .bashre file that sets various variables and aliases. Log out and back in again (pressing will exit from the bash shell and you can then log back in again by typing the bash command). Include the bash script in your report and a transeript of sample testing to show that the script works.1) Write a bash script to demonstrate while loop which displays "While Loop Demo" and exits when key q is typed. 2) Write a bash script using while loop which displays date, your username and current directory every 15 seconds scripts MUST be in bash shell linux commandsPlease answer the following Bash question, please show your output as well. 1. Write a Bash function named ‘Generate-ID' that generates all possible UGA student id start with 900. The output should be saved into a file named studentID.csv. 2. Write a Bash function named ‘Find_word’ that read wordlist.txt file to find all words end with “ing” and output these words to WordEndIng.csv. 3. The auth.log file (path: /var/log/auth.log) and syslog file (path: /var/log/syslog) are two of the most important log files in Linux. Generally, adversaries target these files so that system administrators couldn’t track what attackers are doing. Write a function named get-linuxlog() that reads all the above two files and stores them into a file named linuxeventlog.txt (Hint use the ‘cat’ command)
- Write complete bash script that provides a menu to either double-space an input file or triple space an input file. Use the read command to obtainthe users choice and then perform the requested operation.For double spacing, the script will ask for an input file and then read eachline of the input file. For each line read, it then writes the line back toanother file, but with an extra blank line following. This has the effect ofdouble spacing the file. Include all necessary code to check if the readcommand gets the necessary filename, and whether the specified file exists. If so, continue with the double spacing, if not state that the filenamewas blank or does not exist and end the script.For triple spacing, the script will ask for an input file and then read each lineof the input file. For each line read, it then writes the line back to anotherfile, but with two extra blank lines following. This has the effect of triplespacing the file. Include all necessary code to check if the read…20. Create a linux bash script to get a filename as input and then it should check and display if file exist and size is greater than zero, then should get input of any file comparison operator and then display if the file is true or false for that given file comparison operator. 21. Create a linux bash script to get three numbers as positional parameters then display the greatest and least of the given numbers. If positional parameters are not given then message "This script requires 3 numbers as positional parameters, Try again.." should be displayed.Write a grep command that will match all words in a file that have exactly one 'a'.