Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
this is what it says to do
Use the appropriate commands to create a file from the two created above containing the student first name, last name street, city and Postal Code
i changed the what it looked like on here but thats what it says have to create a 3rd file containing just few words for file 1 and 2
Create a file of about 10 records containing the following data (you create the values) separated by commas:
Student id
First name
Last name
Age
Phone number
Create a file of about 10 records containing the following data (you create the values) separated by commas:
Student id
Street
City
Postal code
Use the appropriate commands to create a file from the two created above containing the student first name, last name street, city and Postal Code
Create a file of about 10 records containing the following data (you create the values) separated by commas:
Student id
First name
Last name
Age
Phone number
Create a file of about 10 records containing the following data (you create the values) separated by commas:
Student id
Street
City
Postal code
Use the appropriate commands to create a file from the two created above containing the student first name, last name street, city and Postal Code
thats it
Great...so go do it. We aren't going to do your homework for you, as has been told to you previously. We will ALWAYS be happy to help you if you're stuck, but so far, you've posted one command, haven't read the man page for it, and posted a follow up question with no effort shown of your own.
Post what YOU, PERSONALLY have written/done/tried, and tell us what you're confused about. We can explain man pages, give you examples, etc., but we aren't going to give you a handout.
I am posting the direct answer as this is for an assignment and not an enterprise activity.
cat file1 | awk '{print " "$2}' |sed 's/,/ /g' |head -2 >file0;cat file2 | awk '{print " "$2}' |sed 's/,/ /g' |head -1 >>file0;cat file0
Congratulations; you've done someones homework for them, and they have learned absolutely nothing from the exercise. Read the LQ Rules about homework questions, and if you're going to post something like this, don't then follow it up to advertise your 'linux learning' blog, which is also against the LQ Rules about advertising.
Also ... "students, that's what your instructor is there for."
The purpose is to give you exercises that you can, in fact, solve by yourself and then to help you succeed in doing them. In this way, you learn about the various command-line tools that you are being introduced to in the class, and you develop the mode of thought that lets you do things like this using them.
"Yeah, it's a little mind-blowing, especially at first." (One columnist wrote a series of articles called A Sip From the Fire-Hose.) But, that's how you learn it. You come to expect to feel like this for a little while – until you solve it, which you knowhow to do.
Last edited by sundialsvcs; 02-17-2017 at 08:28 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.