Sponsored Content
Homework and Emergencies Homework & Coursework Questions Need some help with my homework Post 302494238 by iLeeT777 on Sunday 6th of February 2011 11:06:06 AM
Old 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

Homework?

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

Homework :(

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

Homework Help.

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

Homework

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

Please help me with my homework!!!

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

Homework

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

Homework Help

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
GZEXE(1)						      General Commands Manual							  GZEXE(1)

NAME
gzexe - compress executable files in place SYNOPSIS
gzexe [ name ... ] DESCRIPTION
The gzexe utility allows you to compress executables in place and have them automatically uncompress and execute when you run them (at a penalty in performance). For example if you execute ``gzexe /bin/cat'' it will create the following two files: -r-xr-xr-x 1 root bin 9644 Feb 11 11:16 /bin/cat -r-xr-xr-x 1 bin bin 24576 Nov 23 13:21 /bin/cat~ /bin/cat~ is the original file and /bin/cat is the self-uncompressing executable file. You can remove /bin/cat~ once you are sure that /bin/cat works properly. This utility is most useful on systems with very small disks. OPTIONS
-d Decompress the given executables instead of compressing them. SEE ALSO
gzip(1), znew(1), zmore(1), zcmp(1), zforce(1) CAVEATS
The compressed executable is a shell script. This may create some security holes. In particular, the compressed executable relies on the PATH environment variable to find gzip and some other utilities (tail, chmod, ln, sleep). BUGS
gzexe attempts to retain the original file attributes on the compressed executable, but you may have to fix them manually in some cases, using chmod or chown. GZEXE(1)
All times are GMT -4. The time now is 08:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy