General :: Extract A Value From A File With Awk?
May 17, 2011
it is possible to extract a value from a file with awk, grep or something similar. I have a file like this...
ID1,NAME1,LAT1,LON1,VAR1=5.0,VAR2=7.0,VAR6=9.0,VAR15=0.0,VAR20=0.0
ID2,NAME2,LAT2,LON2,VAR1=6.0,VAR15=1.0,VAR20=5.0,VAR22=0.0
ID3,NAME3,LAT3,LON3,VAR1=10.0,VAR2=20.0,VAR3=8.0,VAR10=3.0,VAR15=0.5,VAR20=9.0
[code].....
and I want to extract VAR15 from each line (which can be at any column unfortunately - columns separated with commas - csv file), or VAR15 together with LATn,LONn from each line. Is it possible to do it with awk, grep or something other in linux?
View 11 Replies
ADVERTISEMENT
Jan 21, 2011
I know a .bin file is an executable file type in linux. We have an error after installing it and it referes to a file name and a line number within the file. I'm trying to find out if the file is part of the .bin file but I need a way to see what's inside of it or extract it.
View 5 Replies
View Related
Feb 13, 2011
File in question is [URL].. meder@pc:~$ tar -xvjf wkhtmltopdf-0.10.0_rc2-static-i386.tar.bz2 bzip2: (stdin) is not a bzip2 file. tar: Child returned status 2 tar: Error exit delayed from previous errors
I tried to unzip it as well, and I tried a various slew of commands to no avail on my Debian box which has no GUI. I downloaded this on my local desktop ( Ubuntu ) and was able to easily extract w/ my mouse so I'm not exactly sure what the extractor did differently...
View 1 Replies
View Related
Apr 21, 2011
Im trying to extract the contents of a zip file but I want to extract it to my own directory. I'v tried -d from unzip but that just puts the contents of the zip into that directory.
But I want to extract the contents of the first (root) directory in the zip if there is only one directory in the root of the zip else just extract the files/folders in the root of the zip file (if there are more then one files).
e.g. test.zip contents the following dir structure:
test.zip
/app_v1/ <-The contents of this directory I want extracted to a dir of my choice
- folder-1
- folder-2
- folder-3
- folder-4
- file1
- file2
View 2 Replies
View Related
Aug 5, 2010
I have a file similar to this:
I need to print the last line for each user into a file. The resulting file should look like this:
Is there a way that AWK can match lines from $1 and then print the last line into a file?
View 7 Replies
View Related
Jun 15, 2010
I stay in /var/www/upload and I want extract a file with tar command.
The output of tar xfvz /var/www/file.tar.gz is
Quote:
tar: /var/www/esempio.tar.bz2: funzione "open" non riuscita: Nessun file o directory
tar: Errore irrimediabile: uscita immediata
tar: Child returned status 2
tar: Uscita con stato di fallimento in base agli errori precedenti
View 4 Replies
View Related
Mar 28, 2011
How do I extract a tar file from one directory to another.
e.g /data1/test.tar to /data2
View 7 Replies
View Related
Mar 3, 2010
I have an ISO CD image file and want to extract it's contents to a folder. I know there are ways to mount the image and stuff, but it's complicated. I'm looking for a GUI tool to open up the contets and extract needed files. On windows I would use WinRar to do this. K3B only allows me to burn the stuff, Arch does not work with ISO files :(Is there a similar tool on Linux, preferably from KDE world?
View 6 Replies
View Related
Oct 15, 2010
How can I extract 5th column from a file without the header.
View 5 Replies
View Related
Nov 23, 2010
I want to extract the file creation time. How to get it. I am using fedora core 4
View 3 Replies
View Related
Apr 14, 2010
I am using a Red Hat enterprise server 5.0 I would like to know if there is a way to extract a single file from inside a war file and display its contents on the screen? For example: I have a file labeled test.war and inside this war there are multiple files/directories. I am interested in seeing the contents of one file labeled MANIFEST.MF without having to unzip the entire war file. does it make sense?
View 6 Replies
View Related
Oct 30, 2010
I want to know if there is anyway I can extract the first few contents of a zipped file and then the next fixed and so on? For example, suppose I have a zipped file containing 1000000 natural numbers and I want to extract the first thousand numbers and then the next thousand numbers (1001-2000) and so on till I reach the end. Is this possible?
View 3 Replies
View Related
Feb 2, 2011
Code:
mencoder The.Negotiator.mkv -of rawaudio -oac mp3lame -ovc copy -o sound-mencoder.mp3
I got a 195.3MB mp3 file
[code]...
View 2 Replies
View Related
May 10, 2011
I'm Fedora 14 Kernel Linux 2.6.35.13-91.fc14.i686
I downloaded the new firefox and I don't know what to do with it.
What directory and file do I open it, or extract it to?
View 8 Replies
View Related
Jan 30, 2009
I'm not sure if this is possible or even where to start. I assume that this can be done with an sh script using tar or similar.I have several very large zip files that contain images for all of the products in my online store. Each image is named after its 13 digit SKU (for example, 9987788000012.jpg). In order to import products into my store, all images are placed into a media directory. Unfortunately, there are over 100,000 images.
So I would like to break the images into sub-folders based on file name. For example, when I extract store_images.zip (or tar or whatever), my extract script would create directories (if they don't already exist) based on the first three digits of each image name, placing each image into the appropriate bottom level directory. For example, "9987788000012.jpg" would be placed in the following directory "media/9/9/8", with media as the root and "8" as the directory that holds any images that start with "998". Perhaps two sub-folders would be less cumbersome.Assuming this requires a script, particularly since it involves scanning image names, creating folders, and saving images to specific directories, which language would serve my needs best? PHP? Has anyone had to do something similar?
View 13 Replies
View Related
May 11, 2011
when I delete a running executable or script, it usually (for me, pretty much always, but I don't know if it will work in every case) continues to run without any problems. So I've got two questions here: Where is the running executable/script being run from? RAM memory? If stored in RAM or where ever, is there a way to extract the executable/script from that location? If it makes any difference, I'm using Ubuntu 11.04.
View 1 Replies
View Related
Oct 13, 2010
I have a config file called hosts.cfg.
It contains entries like this:
Quote:
There are many more of these entries in the file, over 500, all in this same format: each host has a "define host" followed by 18 directives contained in squiggly brackets.
If I want to know all the hosts that are in the hostgroup called SERVER_GRP, I suppose I would need to read every hostgroups line (8th directive in squiggly brackets) that contains SERVER_GRP and output the corresponding host_name line (1st directive in squiggly brackets) from that entry.
View 3 Replies
View Related
Sep 1, 2011
When ever I extract a file from a .tar or whatever, it isn't detected. I notice this mainly when i'm using xampp. I copy zip up all my files on one computer, load ubuntu on another, extract the files to the web folder (htdocs) and then I get nothing. However, when I manually create the files directly on my computer as opposed to extracting them, they appear.
Is there something I need to do in order to have these files appear? Is there some sort of file system refresh? Or am I being a complete idiot?
View 5 Replies
View Related
Dec 13, 2010
I made a bzip2 file by
bzip2 -c /home/os/picture1 > /home/os/Desktop/pic.image
bzip2 -c /home/os/picture2 >> /home/os/Desktop/pic.image
But now extracting pic.image by bzip2 -d /home/os/Desktop/pic.image returns
bzip2: Can't guess original name for pic.image -- using pic.image.out
And then it just creates one file pic.image.out.
How do I access picture1 and picture2 from pic.image?
View 2 Replies
View Related
Jul 21, 2010
This is what I tried to do:>cd ~/Desktop >sudo sh ati-driver-installer-10-1-x86.x86_64.run --extract.After entering my password, this appeared: >sh: Can't open ati-driver-installer-10-1-x86.x86_64.run.What am I doing wrong? It apparently worked in this thread.
View 7 Replies
View Related
Apr 14, 2011
how do I extract a pgp file on Ubuntu? I have the file and a passphrase. On Windows I have Kleoptra so I can right click the file and click 'decrypt'. Is there an easy way to do this on Ubuntu?
View 3 Replies
View Related
Aug 31, 2010
I am trying to untar a file taken from true 64 bit Unix server to RHEL 5 server and I am getting a following error-Archive contains obsolescent base-64 headers.What can be done to extract the contains of those tar file.
View 2 Replies
View Related
Apr 18, 2011
I need to extract a .dsk file, but I have no idea how to do it. The file I want is allegedly the visicalc source code. [URL]
View 2 Replies
View Related
Mar 12, 2011
I have downloaded squid2.6.STABLE23.tar.gz file. I want to untar the file. The file is located in /home. how can I untar the file so I may install the software.
View 18 Replies
View Related
May 22, 2011
how i can extract this Login.jar..
View 9 Replies
View Related
Jan 24, 2010
I just installed Ubuntu for the second time, first time was like 2 years ago and my pc was an oddball and some stuff was just not supported properly. Anyways.. I've got the latest build of Ubuntu installed, everything is working fine, just one problem.
I have many, many, many files that are archived in multiple .rar's. Like .r01, .r02, etc... I have them all copied over to the harddrive, but cannot extract what is in them. Also, I have some of these .rar's archived in a single .rar because of windows being stupid and not letting me copy them to my external drive as the names of them were too long for windows to handle. Those .rar's will extract a couple of the .r01, etc.. files, but not all of them.
View 8 Replies
View Related
May 19, 2010
I can't seem to extract it with any archiver, and when I used unrar from the console, I get this:shai@shai-desktop:~/Desktop$ unrar c1700-adventerprisek9-mz.124-15.T8.rarunrar 0.0.1 Copyright (C) 2004 Ben Asselstine, Jeroen DekkersExtracting from /home/shai/Desktop/c1700-adventerprisek9-mz.124-15.T8.rarExtracting c1700-adventerprisek9-mz.124-15.T8.image Failed 1 FailedYou can see that it can open the archive but it can't get the file inside.
View 2 Replies
View Related
Jun 9, 2010
I have installed unrar-free, and I am trying to extract a file from a .rar archive (actually the file is split into several archives).
When I choose one of the .rar files and open it with Archive Manager, there are no errors and the file to be extracted shows in the Archive Manager window. I then choose to extract it, and after that I click on "show files". But when the folder supposedly containing the extracted file opens, the file isn't there.
Maybe relevant info:
I am running latest stable version of Ubuntu, as the user that was created during the Ubuntu installation. The files are in my "Downloads" folder, and the Archive Manager window says that the .rar file is read-only.
View 3 Replies
View Related
Jun 10, 2010
I formatted a partition on a USB stick in ext2 format for Linux with GParted. I tried to extract a file onto the partition and received a error that said I did not have the permissions to do it.
View 4 Replies
View Related
Jan 4, 2011
I've got a large .tar.gz file that I am trying to extract, I have had a look around at the problem and seems other people have had it, but I've tried their solutions and they haven't worked.The command I am using is:
Code:
tar zxvf file.tar.gz
and the error is:
[code]...
View 9 Replies
View Related