Results 1 to 2 of 2
hi, im new to the forums and to linux, and im having a bit of trouble with my Linux homework.. its not that im lazy or anything, i've read the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-17-2008 #1
- Join Date
- Oct 2008
Help needed with Linux homework...
1.) Write a sequence of commands or a script that demonstrates that variable expansion occurs before pathname expansion.
2.) Explain the behavior of the following shell script:
$ cat quote_demo
twoliner=”This is line 1.
This is line 2.”
a. How many arguments does each echo command see in this script? Explain.
b. Redefine the IFS shell variable so that the output of the second echo is the same as the first.
3.)The dirname utility treats its argument as a pathname and writes to standar output the path prefix – that is, everything up to but not including the last component:
If you give dirname a simple filename (no /charcters) as an argument, dirname writes a . to standar output.
$ dirname simple
Implement dirname as a bash function. Make sure that it behaves sensibly when given such arguments as /.
- 10-17-2008 #2
- Join Date
- May 2004
- arch linux
Welcome to the forums, hawkeye107!
Sorry, but we don't allow homework questions here on the forums.
Please read over the Forum Rules before posting.
Locking this thread.oz