Programming :: Organize A Log File By User Id And Source IP?
May 19, 2011I am trying to organize a log file by user id and source IP. The data I have is in the form of the following:
Code:
user1,127.0.0.1
user2,127.0.0.2
[code]....
I am trying to organize a log file by user id and source IP. The data I have is in the form of the following:
Code:
user1,127.0.0.1
user2,127.0.0.2
[code]....
I have bought a pdf dictionary, but I would like to convert it to stardict for my ereader.
I have converted the pdf into txt but is quite a bad result. So I need to reorganize a bit the txt.
I'm not a programmer, so I should need you write me a small script (python, sed, bash...) that if at the end of the line there is not a point then the line have to be joined with the following line. Sometimes happens that there is a point even in the middle of the line: in this case the line have to be splitted.
Once last thing: after the first word it's needed a TAB. I have appended a preview of the txt file.
that guide me about how (what steps should we do) to organize open source projects in the Linux community.Our idea is to organize an open source project of OPENCVOpenCV is a computer vision library originally developed by Intel. It is free for use under the open source BSD license. The library is cross-platform. It focuses mainly on real-time image processing.Our idea is to organize an open source project in the Linux community, that be a point in which programmers using OpenCV can meet, to develop programs to recognize the road lanes.OpenCV can be used to recognize the road lanes, and allow a car drive alone (if you have a camera inside the car and a laptop mother board running Linux and controlling the car's steering wheel).
Here you have some example of what we want to do[URL]Unfortunately, even being free OpenCV many companies as SIEMENS are working in this, trying to develop an autopilot for cars that would cost a fortune and wouldn't be available for everyone (it will be closed and not free - as Linux).We believe in the free software and Linux.Our idea is to organize a community of programmers interested in computer vision and opencv to create computer programs, and to make the first platform in Linux able to recognize the road lanes and allow the cars to drive alone.
Our problem is we don't know how to do that.How do you organize an open source project in the Linux community?How do you get people involved in the project?How do you start from cero?Please, help us to organize a project of this type, to make the first autopilot of the automotive industry, based in Linux
How should I organize user logins and passwords within a 6 person firm? We have several desktops, portables, servers and virtual machines. Everyone should be able to log in on each PC. Ldap seems overkill. Would NIS be more suited?How can I integrate other passwords like samba, mysql, vpn, ... Into this strategy?
View 4 Replies View RelatedIs it possible to organize bash script output of which is like on top command i.e. monitoring every let's say 1 sec and old information would cleared?
View 3 Replies View RelatedI am trying to write a simple script to create some directories to organize photos.
Next I want to cd to the newly created dir DATE_BANDNAME, how can I do that?
I am setting up a file server using Ubuntu and want to make sure I set up a folder structure that will last. Where should I be placing everything that I am sharing (Music, Pictures, Videos, etc)? In theory, if I was setting this up on Windows, I would create a folder directly under C: and set up the different areas of sharing under that (not that that approach would be best either).
Based on constructive criticism, the question is rather ambiguous. My question could be restated to ask "Where shouldn't I set this up? Would /usr be an appropriate place to start? Or would /opt be better?
Over the years of working with both images (many) and other files (many more) it seems that it is easier to organize images. There are a variety of image software (digikam, gthumb, the new "shotwell") etc. Its easy to organize them with multiple references - date, multiple categories etc. This in fact makes it easy & efficient in our multi disciplinary world to access the same image for multiple needs.
However the same is not true for other files (od formats, pdfs etc etc) the only way we seem to be able to sort them is by what folders we make. Of course we can use meta search engines to find it by other keyword / dates etc. But it is not the same as being able to give multiple tags to a file and later being able to retrieve by that particular tag.So am wondering if such a file tagging / sorting and accessing "thingy" already exists and if so what is it. Or it is available and i don't know where to look.
Is it possible to pass arguments to a source file in a bash script? For example
#!/bin/sh
#
. /dir1/dir1/funclib -a -b
How would you check for the passed arguments in funclib without getting confused with any arguments passed to the main script?
I'm investigating how to copy a file located in my file system into another device. I googled to find a solution for my case but I didn't find anything. My original problem was to find a way to permit my code to move a file into a USB device. I wonder If is there a way to implement the cp command or some mechanism that permits my code to interact with between the file system on my computer and the second one on USB external driver (FAT32) ?
View 3 Replies View RelatedI had made some modifications in the source code of a software called "HomeBank". I'm not able to make a setup file using "Inno setup".how to create an .EXE file for the source code to execute.
View 2 Replies View Relatedi am trying to generate a linux executable data (bin data) from my java source code.
View 4 Replies View RelatedI want to find a simple and quick way to permit my application to bring a file located in my file system and write it into an external USB device. I have to use Bulk Transfer Only mode that means to use stream of characters only. I looked through the LibUsb library using it in my IDE I can transmit a string. To transfer a whole file I suppose I've to dodge the file system building a char sequence that permits to recognise a file in the file system and to put it into the usb device.
View 1 Replies View RelatedUsing a list of names (over 4000 of them) painstakingly gleaned from the source file years ago for a database file, I want to match the names against the source file so that they can be updated with the tags <forename></forename> in the original source file.
I placed the list of names in @forenames (only posted a few of them here).
Perl script is:
I am able to get the name bracketed by the tags to appear on the console screen but don't know how to apply the output to the source file. Perhaps I need to do a match on the words then some kind of edit to surround the matching words with the xml tags? I'm a rank novice doing this as a labour of love for a friend.
I was wondering, what would be a good, open-source file format for a beginner in the field, like me, to start editing sound files? This file format would have to be well documented, preferibly open-source, lossless and, most of all, convertible to more popular file formats, such as mp3 or wav maybe. I would like to design my own sound effects through directly editing the binary sequence of a sound file. I imagine this editing would have the purpose of adjusting the voltage variations of the sound device's output in time. It would be perhaps something like a PC-controlled signal generator. I'm thinking I might be able to do this in linux with something like
Code:
$ dd if=mysound.raw of=/dev/audio
But then, which book or resource woule be a good and through explenation of the relationship between the bit sequence in mysound.raw and the signal function generated in the output of, say, my computer's sound card.
Looking for an open source solution to convert pdf file to excel document.
View 1 Replies View RelatedWrite a program that requires the user to input the name of a file as an argument. If the user fails to include one argument it should make use of a thread that handles a signal. The signal handler should tells the user Incorrect number of arguments and then calls the terminate signal on the process.
If the numbers of arguments are correct then the program should allocate memory space to the file (5MB) and create a child process that requests the user for a character that it should send to the parent. The child should keep request for data until the user keys in the character O. During each request it should pause for 10 seconds, send the character to the parent and then requesting again for another character.
The parent should get the character from the child. Do not make the parent wait for the child to finish requesting for data. Make use of pipes to facilitate communication between the parent and the child. A second child should be created to read and display data from the file. Make use of any appropriate Inter Process Communication technique to ensure that the second child and the parent do not access the file simultaneously (Mutual exclusion).
is there a way to save/create a file with fopen so the file is in the user home directory.Normally I'd do fopen("/home/me/myfile.... but me might change from one user to another. So can I so some sort of switch so it saves to whoever is using.
View 5 Replies View Relatedi got a sample.c which generate a linked list for sorting according to the number generated. then i want to split the sorting function into a header file. and it looks like the sort function in the header file could not access the linked list in the main. the error is dereferencing pointer to incomplete type
sample.c
Code:
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
[code]...
in bash scripting...say I want to take the input from a user via a question...I would do this:
Quote:
#!/bin/bash
echo "How large do you want this partition to be in GB (enter only the number)?" read PART_SIZE echo "You want your partition to be $PART_SIZE GB" But I don't want to echo it back to the screen, I want to add it to the content of /etc/fstab. I have been mucking around with sed to find the tmpfs partition in /etc/fstab and add the partition size attribute (this is to use the onboard RAM as a volatile partition)...but am not having any luck...
The portion of /etc/fstab that uses /dev/shm for the tmpfs partition is:
tmpfs /dev/shm tmpfs defaults 0 0
So, if a user says "24" GB to the answer (from above), how do I get it to automatically add that value to the tmpfs partition line in /etc/fstab? So it would look like:
tmpfs /dev/shm tmpfs size=24g,defaults 0 0
I understand that I would also have to come up with a way to put "size=XXg", which I could do with a copied over generic file before this action...then the script would have to find "XX" and replace it with the user's figure...
My script is set up to add users to the system. I need to add to each user of a department a file in their home directory with the name of their department (ex. IT department should have a file IT, Engineering should have a file ENGINEERING, etc.) I'm not sure where or how to put this in my script to accomplish this.
#!/bin/bash
datafile="users.dat"
IFS="
"
for i in `cat $datafile`
[Code]...
I had a situation in which the the path of the file to be copied is written in other file and I had to copy it using shell script..I can use cp $(cat /home/robert/location.txt) /media/sda1 on normal linux shell...But I am using buildroot script where $(cat /home/robert/location.txt) evaluate to nothing..is just blank..
View 1 Replies View RelatedI am trying to compile C source file to generate .trb file (turbo file) which will then burn on trubo sim using TP2. When I comiple the code following error is occuring. before going through belwo error I was getting error 'Unknown MCU atmega128', known MCU are: (list appread), then I change the configuration and set the MCU to supported list then following error is occuring.
XXXXXXX@MYN8G5R52S /home/my-aip/my-aip
$ make
avr-ld -o my-aip.elf my-aip.o -L../../turbo-devel/lib -T turbo.lds -d -r --emit-
relocs -R ../../turbo-devel/lib/public_calls -lformlib -laes -lm -lc `avr-gcc -p
[code]....
Now strange thing is that whats so ever the value is of atmegs.. is I am facing same issue.
We are developing program for modelling some physical problems and I want to organize testing process of it.
View 4 Replies View RelatedI have a folder in my /home/user/documents/ directory, which I use to organize all of the files for class (teaching), early this week I moved all the contents of that directory to a subdirectory, and began writing lectures for the new semester. I just sat down at my computer and all of the changes I made to the directory have reverted to the way they were a week ago. Files are gone, the lectures I had written so far are gone, my syllabus is gone... I had a symlink to the directory on the desktop, its still there, but it's broken. The directory is a symlink to an NTFS partition, the /Documents directory is shared between the two OS's. Did this cause the problem?
Luckily I had today's lecture backed up on my website... so, i'm not sunk for today.. but.. this really scared me.
I have written a command line script in ruby to organize and fetch your favourite commands.[URL]Feel free to use it and come with ideas and comments
View 4 Replies View RelatedI am looking for a program that can organize music and movies BUT, heres the deal. What I need to do for my collection is be able just to go through the 1000s of cd's and dvd's and be able to type them in AND then once I'm finished I need it to be able to put all of them in Alphabetical order. You should know that a couple hundred are burned so they will not register inn an online database to be able to find album or actor info.
View 1 Replies View RelatedI noticed (the hard way) that enabling a guest session under 9.04 does not lock the source user. I enabled a guest session for someone and came back to find them rooting through my files. By quitting the guest session, it goes back to the source user's desktop without requiring a password. Shouldnt it go to gnome-screensaver automatically? Can this be changed? Is it a bug?
to replicate: log into source user's account use the menu to start a guest session quit the guest session root through files un-opposed.
I sort of asked this question in the arch linux forums since I was interested in arch but I still have yet to get a response (maybe it's too early).I wan't something like gentoo but without taking up unnecessary space like gentoo's portage does (/usr/portage/). I find that to be a serious flaw with gentoo. Yes you can use squashfs-unionfs to help but it requires some work especially when something goes wrong with portage.I was thinking about arch but can you use it completely as a source based distro? Some people seem to have said it requires scripting and some work from the user. I wan't something that'll do it for me so I can set it and forget it.
I heard about source mage linux and exherbo but I'm not sure what to think. I'm thinking about trying arch linux and source mage but perhaps there's other distro's I don't know about. I'd really like some suggestions.
I want to add 50 new users, not on the server yet I want to add them all to group Accounting - with 1 option, not user by user I want to setup a default password for them all, and have it say something like 'You must now change password or no access will be permitted' Any other options I also want to do once, not for each user?
View 3 Replies View Related