how can we write multiple lines to a text from command line without using cat, touch etc?
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.
I tried it and it works, is there any other way without cat command?
I have searched in internet, in books and the problem is that everywhere
you can find what each command does, you can't find which command does the
procedure you want. everywhere they say that you can do it with cat command.
if it is a problem for you I won't ask again anything, but this is not
a way to encourage someone to get started with Linux. I am not a young student.
I am a physics teacher who is taking Linux lessons to enhance my teaching and knowledge.
sorry to disturb you. I thought here was a place to find help and guidance.
i am not a child to take advices that this is my homework.
I found a real friend to help me love Linux.
You can delete the thread and goodbye...
You can use ed or sed instead. As with vi there are whole books published on either. Your tech library might have one available for loan, sed at least, if it is a library of any caliber.
Anyway, about the assignment, as others have asked please show what you are trying and where you are stuck. Keep in mind that Linux is the kernel. Bash is the default shell on most distros and most of the programs you would invoke from Bash to solve your assignment are also from the GNU project others are from the BSD projects. Some, such as perl and python3, are not from GNU.
sorry to disturb you. I thought here was a place to find help and guidance.
i am not a child to take advices that this is my homework.
I found a real friend to help me love Linux.
You can delete the thread and goodbye...
stratos20vt,
Please understand that the premise of the LQ site is that we are here to "help", but also please understand that this is not intended for the questioner to obtain 100% free solutions, instead we're trying to get people to learn about Linux and thus help their selves more aptly for any future technical explorations they undertake. The old saying of "Give a person a fish, you've fed them a meal. Teach a person how to fish, and you've given them the talent to feed their self for a lifetime."
As part of our LQ Rules where some are fairly strong, there is one about homework, and here it is:
Quote:
Do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and searches) and we'll do our best to help. Keep in mind that your instructor might also be an LQ member.
The part where we're happy to assist and also the part about providing references, notes, searches, etc are the things people are reasonably asking your to update with. In general, people here are happy to provide suggestions, there are quite a few, and some interactive responses, which you have participated in for some of them.
Sorry but if you're unwilling to illustrate some of your efforts, it would seem that we are unable to help you further. But if you choose to share some more details about the things you have tried, versus continually providing blocking updates to suggestions, then perhaps you can get some assistance.
As an example, you certainly can provide a reply update which fully explains all of the allowances and restrictions that you are given as guidelines to complete your assignment, but you also should include what you've currently tried and how that worked, or didn't work, much like you showed examples of using echo, more, and I/O redirectors to files. It would be best for you to literally show what you presently have as your attempt and explain why it's not a final solution, along with the restrictions and allowances you must follow. Otherwise, this will continue to be a frustrating thread.
sorry to disturb you. I thought here was a place to find help and guidance.
i am not a child to take advices that this is my homework.
I found a real friend to help me love Linux.
You can delete the thread and goodbye...
Yes, this IS a place for help...however, you just keep repeating your homework question, and *TELLING* us what you won't accept. And you won't show us your efforts to actually do your 'exercise', and don't seem to want to research anything you're told about. You've been asked several times to show your efforts and have not.
The type of response you gave here has been seen many times in the past. Good luck in the future, because if you don't want to put effort into learning you most certainly won't have the knowledge or skills to do much of anything.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.