Question

Consider the variable path=”/home/acs/home/acs/inbound/HERTZ_20170628.csv”. Which of the following statement will return the file name HERTZ_20170628.csv? a....

Consider the variable path=”/home/acs/home/acs/inbound/HERTZ_20170628.csv”. Which of the following statement will return the file name HERTZ_20170628.csv?
a. echo ${path#/*/}
b. echo ${path##/*/}
c. echo ${path%/*}
d. echo ${path%%/*}

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Option b: echo ${path##/*/}

Explanation:

To print just the file name along with its extension, correct syntax is echo ${path##/*/}

Add a comment
Know the answer?
Add Answer to:
Consider the variable path=”/home/acs/home/acs/inbound/HERTZ_20170628.csv”. Which of the following statement will return the file name HERTZ_20170628.csv? a....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • After Loading the .csv file into your R session (it could be any CSV file), and...

    After Loading the .csv file into your R session (it could be any CSV file), and how can we do the following commands to find information (a)List column names of .csv file (b) change the name of the last two column respectively. Leave first column name as Year. (c)Confirm that column names have changed as expected. (d) Eliminate all rows with NA fields, if any. (e) Set "Year" as a factor. (f) Verify (e) has worked.

  • b. echo Your file has been processed c. echo l; d. cp file /tmp 36. You...

    b. echo Your file has been processed c. echo l; d. cp file /tmp 36. You can use the command to start a program with an environment variable setting that is not part of your current environment. c. use d. env a. export b. set 37. The command displays a list of all environment variables defined in your current environment. c. use d. env a. export b. set he environment variable contains a list of directories on the Linux system...

  • 1. Create a table that will hold the data in avgprice kwh state.csv. This .csv file...

    1. Create a table that will hold the data in avgprice kwh state.csv. This .csv file contains the annual data from 1990-2012 on the average energy price per kilowatt hour (KwH) by state and provider type. Implement the following queries: • Print each row that has Tennessee as state, order the result by year in descending order. • Print the average residential, commercial, industrial, and transportation price for the state of Texas from the year 1990-2012. 2. Create the tables...

  • Question 2 If you read in a csv file using read.csv() function into R, what is the resulting datastructure in which R st...

    Question 2 If you read in a csv file using read.csv() function into R, what is the resulting datastructure in which R stores the read-in data? A. numeric B. matrix    C. data.frame    D. vector    Question 3 Suppose you have 4 integers, 4 characters, and 4 logical values. Which datastructure can you use to store all 12 values? Choose one or more options. A. a vector B. a matrix C. a list D. a data frame Question 4 Suppose you have...

  • Objective : Write a C Shell script which copies all files(*.java and *.class) from your home dire...

    Objective : Write a C Shell script which copies all files(*.java and *.class) from your home directory to a new one, and Analyze the new directory information such as number of files, user permissions, and disk usage. Sample Output:                                                    << CS Directory Analysis >>      Date:   ============================================================ Current Directory: /home/tomss New Directory Created : /home/tomss/pgm01 File information Total Number of files : 22 files Directory files:   0 files Plain text files:   10 files File have read permissions: 3 files File have...

  • We're working with a csv file, which contains employee information. Each record has a name field,...

    We're working with a csv file, which contains employee information. Each record has a name field, followed by a phone number field, and a role field. The phone number field contains U.S. phone numbers, and needs to be modified to the international format, with "+1-" in front of the phone number. Fill in the regular expression, using groups, to use the transform_record function to do that. 4 1 import re 2 - def transform_record(record): 3 new_record = re.sub(_) return new_record...

  • variable someValue to the streams buffer. an output string stream variable called oss, write a statement...

    variable someValue to the streams buffer. an output string stream variable called oss, write a statement that appends the value of a write a statement that appends the value ofth nt a. css oss. sonevalue; b. 033 someValue Given that a string variable fi1eMame is set to "save ti1e. tab" and an outout file stream varable OFS, which correctly opens the file with the string tilelame as the file name? a. OFS.open (tileName) : b, ofstream open)i c. ofstream,openifilelame) d....

  • 1. Which one of the following commands will update the PATHEXT environment variable to include it...

    chapter 11 1. Which one of the following commands will update the PATHEXT environment variable to include its original contents plus the file extension RUN? a. SET PATHEXT-YPATHEXT%; RUN b. SET PATH+.RUN c. SETX PATHEXT5%PATHEXT%.RUN d. SETX PATH %PATHEXT%,RUN display the default command used to open a spe- cific file type? a. SETX b. ASSOC c. PATHEXT d. FTYPE 3. What command-line utility is used to display the file type linked to a specific file extension a. SETX b. ASSOC...

  • Consider Mark and Jen’s income and deductions. They file a joint return. Their combined gross income...

    Consider Mark and Jen’s income and deductions. They file a joint return. Their combined gross income is $168,000. They have the following possible amounts which qualify as itemized deductions to consider: $4,100 in real estate taxes, $4,125 in interest paid on their home mortgage, and $1,200 interest paid on a home-equity loan. They have three children who are claimed as dependents. What is the Johnson’s taxable income? Label each value used in the calculation carefully. Please explain where does exemption...

  • Assignment #1: Write a C++ Program. Consider the following program segment. // Name: Your Name //...

    Assignment #1: Write a C++ Program. Consider the following program segment. // Name: Your Name // MU ID: Your ID // include statement (s) l using namespace statement int main() //variable declaration //executable statements // return statement a. Include the header files isotream. b. Include cin, cout, and endl. c. Declare two variables: numi, num2, num3, and average of type int. d. Assign 125 into numi, 28 into num2, and -25 into num3 e. Store the average of numi, num2,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT