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!
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.
I am having a problem with a script I am writing. It is a simple kind of script which joins a few files, spits out a csv file and then I call a perl script to convert it to html.
The following 3 lines are giving me trouble:
#I know I could do the sort all in the join line - but I find this more readable
sort -t, -k2 /tmp/proxmox/nmap_net0_join > /tmp/proxmox/sorted_nmap_net0_join
sort -t, -k1 /tmp/proxmox/qmlist | sed 's/ /,/g' > /tmp/proxmox/sorted_qmlist
join -t, -11 -22 /tmp/proxmox/sorted_qmlist /tmp/proxmox/sorted_nmap_net0_join >/tmp/proxmox/statusinfo 2>/tmp/proxmox/log
If I execute each line individually in a command prompt the statusinfo file is generated correctly. However if I execute the script I get a "join: file 1 is not in sorted order" exception in the log. What am I missing?
The bash -x option was new for me. I haven't solved the problem yet, but now I have more info to work with. I will sprinkle the script with echos and other output so I know what is happening at that stage.
(NA where there is no matching data). I have tried with simple left and right joins (using -a and -e options) as well as initial g/awk attempts (don't really graps awk yet). not working as expected yet. Any thoughts?