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 want to search for "Forever" After each line of Rep and if i find Forever print "Forever Yours" if i dont fine "Forever" insert line "Healthy Wealthy"
for above file the output should look like this...
[sigh] You have to realize that, just like in your other post, nobody is going to write this for you (well, I just did). But we are willing to help you figure it out.
And I will be more than happy to share at least parts of my solution and the logic I used, once you have shown us some of your own efforts. Mind you, my solution might not be the best/fastest/smartest, but I have at least solved this problem. Using what knowledge and talent I have. I am 100% sure that not only I, but other users would feel inclined to help you out with this, but it all boils down to, and I am sorry if I repeat myself, helping you help yourself.
So... please show us what you have done this far.
With best regards,
HMW
Last edited by HMW; 10-03-2015 at 03:06 AM.
Reason: spelling
Are you confusing questions? Your other question was about making all into one line, which this one does not mention, whereas this question was about updating / adding text.
You may wish to keep everything on the same topic or restate your question as this will confuse those trying to assist.
I want the multiple lines in file to be starting with Rep and ending with year.
So the file i made it to singel line. But the num of feilds are not same . I want the missing feild to be inserted as some text.
for 2nd line am missing 3rd columns so i want to fill it with some dummy value.
either make or add missing 3rd col in straight line
I want the multiple lines in file to be starting with Rep and ending with year.
So the file i made it to singel line. But the num of feilds are not same . I want the missing feild to be inserted as some text.
for 2nd line am missing 3rd columns so i want to fill it with some dummy value.
either make or add missing 3rd col in straight line
(or)
make or add 3rd line for the file
WHAT!?!
This is hopeless. Do even you know, for sure, what your desired output is supposed to be. Or is that defined by some entity whispering to you!?!
Sorry if I sound slightly vexed, but this is the second thread where you alter either the input or the desired output and/or change the criteria for your problem.
I am not trying to be mean or disrespectful - but this is, quite frankly, aggravating.
Tell you what, I am going to give you a solution, to your ORIGINAL problem, as specified by you here. You'll get this for free, as in "gratis", and after that I will stay the **** out of your threads.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.