SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Greets all. I'm having a brain freeze and can't figure out this simple problem. Been in windows too much I guess...
I have 2 files. File 1 is a complete list of what I need. File 2 has one or more lines missing but is more or less the same as file 1. I need to compare file 1 and 2 but only print the extra lines found in file 1. The files contain nothing but single words on each line if that matters. I've looked into sdiff, cmp, awk, uniq et. all but am still stuck for some reason. None of those seem to do what I want except for some sort of awk array maybe... But that still seems like overkill.
tail -n outputs the last N lines not omits the first line. That could short me a bunch of files...
piping to sed isn't bad I guess (kludgy tho) but that doesn't work in all circumstances. Here is my:
$ diff file1 file2
The only thing your command does is scoot the 'name' I want to the beginning of the line. I'd have to pipe multiple times to get it solo... Extremely kludgy. Also, I'm assuming the "---" is because their is a blank line in file2 which I don't need to account for. This just doesn't seem the way to go. Way too specific and sloppy to boot.
I'd really like to get sort or uniq working. I guess I just don't understand uniq and why -u isn't doing anything.
Yea.. I thought of that after posting my last comment. It works... But... Now we are back into being kludgy again... Don't you just love that word?
I don't get why this has to be a multiple step process but whatever I guess... See, once I extroplate the missing name, I have to fetch a version number to tag onto it, integrate it with the file that didn't have it and then sort them according to another 'order' file... I'm sorting twice, once with 'sort' and then thru a function I have to sort according to a static list.