I have a few problem. I have a txt file that convert from pcap to txt file. What I want is to eliminate unwanted text from my txt file. Here is the example of the what I want to do:
I presently dual boot with Vista Home Premium and Ubuntu 10.04 LTS. Since the installation of Ubuntu about 8 months ago, my Grub menu at boot up shows all the updates for Ubuntu 2.6.32-24, -25 and -26. How can I eliminate the first two and only leave the latest update?
im trying to output a list of running processes via a shell script. At the moment i got this which outputs the processes to a text file called out.
echo $(ps aux) >>out
The problem is though, the processes are all just one big block of text which makes it hard to read. Does anyone know how to sort the output to a text file so that it prints to the text file at 1 process per line? I know its probably simple but im very new to linux.
Currently, I'm working on personal project. and I'm kinda stuck. What I want to do is that open a file, and edit that file (deleting unwanted characters). The problem arises after I deleted unwanted characters, the file still has the same length of the original one. Let's assume that we have a file with "1234" in it. I deleted "3" ( I overwrite "\0" ) so now when I check the file, it's 124. But when I check the length, the both have the same size as 4
Here is an example source code int length, length2; num = open("a.dat", 2) length = lseek(num, 0, 2); // Initial length lseek(num, 2, 0); // editing write(num, "\0", 1); length2 = lseek(num, 0, 2); // Final length close(num);
When I print those values those are exactly the same. Length2 should be one less than length, but the both are 4. What's wrong in m code? Am I supposed to use different character rather than "\0"?
I am familiar with bash, but my works require csh. in my .cshrc, I created this alias:alias cd 'cd !:1; ls -l' It works very well except for one case: when I cd without any parameter:
cd In which case, I get the "Bad ! arg selector" error. How do I eliminate this error?
I need to be able to convert HTML email messages saved as text files (.eml or .msg) to PDF documents, one PDF per email, retaining formatting and images.
Are there any Linux tools that will allow me to do this from the command line (so it can be scripted)?
There are these shortcuts in the GTK3 file chooser: [URL] ....
With the exception of "desktop" which I included in the red box by mistake, I don't want those shorcuts to be there. I've even deleted most of those folders from my home directory because I have no use for them, but the shortcuts remain even after the folders are gone.
How to remove/disable these shortcuts? And while I'm at it, I notice that it's not using my selected icon theme for those icons. Any way to make it use my choice of icon theme?
This is for educational purpose. In fact it is my lab tutorial for a subject.I want to capture the users password when he changes his password. Both new and old.This is the script i have come up with:
Code: #!/bin/bash echo "Changing password for user $USER."
Whenever I login to a certain server using SSH I get a very long delay before a prompt appears. Everything I looked up on this issue says that it's a DNS issue and that I should disable reverse DNS lookups on the server.
But, the remote server is a shared webhosting server. I e-mailed the sysadmins but they say they have no DNS issue and that they won't change the server configuration. So, how can I fix this issue from my side (client side)? I have a static IP address and a hostname that points to it.
i'm trying to convert a html file into a text file when i simply run "html2text <filename>" the output displayed is the way we want but when i redirect the same using "-o" or ">>" the file is having extra characters in it. i even tried -ascii,but no much use.
Every time kubuntu updates its headers/boot image I get another version on disk in /boot. These also show up in menu choices when I boot. I currently have 7 or 8 versions and would like to get down to three or four.
In the past I just deleted the files of related versions from /boot but is this the preferred method? Is there a better/safer way to get rid of old kernels?
I put a text file on my desktop and added a couple lines of text with gedit. File type shows text/plain. Double-click opens the file in gedit which is what I want. I'm using the file to temporarily hold some snips of code that I copy from file to file, but when I copy some html into the file and save it, now file properties show it's text/html and a double-click opens the file in firefox, which isn't what I want. Is there some way to keep the file type from changing itself?
I need to insert 3-4 lines of text to the beginning of a text file. The file is a largish MYSQL dump, the result of a backup shell script. This shell script should insert the required text.I've wrestled with sed, but lost.
I have to delete a certain line of text from the a textfile via ubuntu's shell scripting.I have done research, and it seems that most people advocate the usage of sed /d option. sed makes does not edit the text file. Hence, most options I discovered involved the use of a temporary variable/textfile and then overwriting the old file with the temporary new file. Is there anyway whereby I can bypass the use of temporary storage containers? I hope there is any magical combination of commands to edit the file directly.
I want to display something in my text view widget in glade using c code. that's all right. now I need to attach a save button beneath the text view.so that on click the text view content should save as a txt file..
I want to display the contents of a particular log file (simple text file, I mean in Linux). But there is a problem: The contents need to be organized in a fixed format. Have a look at this log file:
So, while displaying the contents of above file on a web page, I want to format the field names found in the log file: User Name:, Reported Problems Description:, and Remarks:. These fields may contain a variable length of text and no specific line number is assumed for them to appear on.
Well, what I am trying to do may sound wierd to some of you. The filed "Reported Problems Description:" can possible contain text which embeds colon (.
I am looking for a way to keep a log and make if then statements if a line exitsts in the log. I also am looking for a way to make a simple loop, like goto line number, and I also am wondering how to add/remove bits of text from a text file (plugins line in server.properties)
a sed command to add a text before line number in text file? I have text file with 500 lines, and i want to add 3 more lines with text after line 300, OR before line 302, isn't no problem.
I have a text file which is a list of all my contacts. So far i have only found software and commands which remove duplicates but i would like to remove all duplicates AND their original entries too so only contacts which have no duplicates are left.
We are currently transferring data from a proprietary DB to Postgresql. All of the data is in text files, each approx 125,000 lines long.I have a problem with 2 of the files.One of the columns contains a numeric which should be in the format 00000.00 or be 0.00 -unfortunately approx 25% of the records contain a null.I can use cut to 'slice' the file into 3 sections but my problem is : how do I keep the values and only replace the nulls with 0.00