02-06-2011
Need some help with my homework
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Hi, since I'm relatively new to Unix I need some help. I've installed FreeBSD 8 on a virtual machine and I've done most of the tasks but don't know if I'm right or wrong ;/
Here it goes:
1. Why do folders /bin and /usr/bin usually come out at the first place as an output of the command echo $PATH?
2. Explain what would be the result of the command $ `date`
3. You want to concatenate the two files foo1 and foo2 but you have to put some text from the command line between them too. How would you do that?
4. If a command procedure contains a command:
echo ${d-'*'}
what would come out?
5. Can you use sh < foo.sh instead of sh foo.sh to execute a script?
2. Relevant commands, code, scripts, algorithms:
echo $PATH
$ `date`
echo ${d-'*'}
3. The attempts at a solution (include all code and scripts):
Ok, first of all I don't know why but I can't create files to test some commands ;/ I mean I write for example cat >file1 and it says "Cannot create file1. Read-only file system."
Here are my answers dunno if I'm right or wrong so please help me :]
1. Because in those folders are the most important system scripts, files etc. that are being used when the operating system loads
2. In my case it came out: Thu: not found.
But when I change `` to ' ' it says the correct date. Is that the catch here?
3. Aah maybe:
cat >>foo1 foo2 >foo3 or maybe not?^^
4. It prints out - * ?
5. I'm not sure about that one - maybe you can, because < is used for input
Thanx a lot
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
New Bulgarian University, Sofia, Bulgaria, N.Gadjev, CSCB584 UNIX
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
7 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
https://www.unix.com/shell-programming-scripting/113946-scripts.html
Looks like an assignment or homework to me, does it to you? (5 Replies)
Discussion started by: TonyFullerMalv
5 Replies
2. UNIX for Dummies Questions & Answers
1. You have a very large file, named 'ColMe', tab-delimited, you are asked to process. You are told that each line in 'ColMe' has 7 columns, and that the values in the 5th column are integers. Using shell functions (and standard LINUX/UNIX filters), indicate how you would verify that these... (1 Reply)
Discussion started by: mb774
1 Replies
3. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Hello,
My name is Jordan and studying at the New Bulgarian University in Sofiya. This is my homework but can... (2 Replies)
Discussion started by: freestar
2 Replies
4. Shell Programming and Scripting
1. Write a shell script to print the file names of all files having .txt extension of a given directory after converting to uppercase letters. The input (directory name) should be given as command line argument. The script will also check whether sufficient arguments are passed or not and whether... (1 Reply)
Discussion started by: aninda1989
1 Replies
5. Homework & Coursework Questions
A shell script is a script written for the shell, or command line interpreter, of an operating system. Typical operations performed by shell scripts include file manipulation, program execution, printing text etc.
Shell : In computing, a shell is a piece of software that provides an interface for... (1 Reply)
Discussion started by: ubun
1 Replies
6. Homework & Coursework Questions
plz i need code to search about numbers like this :
962785785698
962795565488
962785321565
962777321684
962795979515
i need code to detect just numbers start with "96278"
i need it in awk !!
thanks (1 Reply)
Discussion started by: eyad mohammad
1 Replies
7. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
2. Relevant commands, code, scripts, algorithms:
Write a command to display lines ending with the... (1 Reply)
Discussion started by: elh009
1 Replies