General :: Write A Script To Extract Information From Db Tables?
May 25, 2010
I want to write a script that will extract information from a db table and store that information to a csv file. Basically, I have imported data into a table, I want to save this data to a csv file for later processing. How do I connect to the db and extraxt information from the table?
View 3 Replies
ADVERTISEMENT
Feb 17, 2010
I want to write a shell script which will simultaneously collect OS user information and write in an individual text files.Can anyone tell me the syntax of the script.N.B. The user name will be mentioned in an array within the shell script.
View 8 Replies
View Related
Sep 3, 2009
I'm trying to write a program which would get information from a webpage and display the information on my desktop sort of like a widget. I kind of remember there being something like this already made, but for the life of me I can't remember what it's calledDoes anyone know?
View 1 Replies
View Related
Apr 28, 2010
I am trying to locate the tables in Versys the house demographic information, does anyone know the path?
View 1 Replies
View Related
Aug 2, 2011
How would I use cut or grep to take this line :
Code:
Load......................... 198 Watt(22 %)
and make it into this information, in a text file :
Code:
198 Watts
If you don't mind, please explain the process, as I have been trying to figure this command out, and I must be missing something.
View 9 Replies
View Related
Jun 30, 2011
I want to download a webpage to extract information. This used to work with other pages, but with this particular page [URL].., I get the following error.
Code:
bjvca@ifpri-laptop:~$ wget http://www.farmgainafrica.org/index.php?option=com_content&view=article&id=5&Itemid=27
[1] 10375
[2] 10376
[3] 10377
[Code]...
View 3 Replies
View Related
Oct 24, 2010
I have a file which has the output as shown below:
Code:
Teams | matches |Goals | YC | RC
------------------------------------------------------------------------------
Liverpool: | | | |
Gerrard | 97 | 100 | 41665 | 1342
[code]....
I need to extract the Info from the RC column for the first 4 players of liverpool. The test code i have does the same,but can anyone show me a better way of doing it.I could do it easily with gawk -F"|" and print the respective column,but i need to do this in perl.
Code:
#!/usr/bin/perl
use strict;
use warnings;
[code]....
View 7 Replies
View Related
May 10, 2011
I would like to extract debug information but I have some problems. For example, I have a executable a.out...
Quote:
nm -f sysv a.out | grep ".global_var" >vars.txt
With this command I extract all my variables. All of them are in .global_var section, and it give me follow information:
Quote:
CAN_station_n |08073258| D | OBJECT|00000001| |.global_var
CONTROLend |080732a7| D | OBJECT|00000001| |.global_var
[code]....
Well, I have only address of my vars, but I would like to know type var or struct of the variables. With dwarf dump I have all of information, but it is a mess...
Quote:
<1><117bc>: Abbrev Number: 32 (DW_TAG_variable)
<117bd> DW_AT_name : (indirect string, offset: 0x153d): draw_limits
<117c1> DW_AT_decl_file : 128
<117c2> DW_AT_decl_line : 207
[code]...
Is there any parser or way to put in order this information?? create a file with the follow information:
name of var - address - type - size - struct or not
View 5 Replies
View Related
Feb 27, 2010
I need to write a script to report useful information on disk utilization for each user's home directory.For each directory I need to show: 1. the long listing of that directory entry (but not the files in the directory), so that I can see the rights and owners of the directory.2. The amount of disk used by that directory, in human-readable format, including subdirectories. I need to have two lines for each user one after the other. For example:
/home/user1 directory info
/home/user1 disk usage
/home/user2 directory info
/home/user2 disk usage
The script will assume that all users, except user root, have their home directories in the /home directory (no need to do anything with the /etc/passwd file). And if the administrator adds or removes users, the script should still work correctly (so the script shows the information for all current users).
Here's what I do know. The command "ls -ld /home/user's_name" will give me the info I need for #1. And the command "du -hs" will give me the info I need for #2. What I don't know is how to grab each individual directory in order to apply the above commands to each of them in order. ???
View 14 Replies
View Related
Aug 20, 2010
I'm looking for a way to insert an SD memory card into my computer and have it copy the files from it (a specific directory) in the background while I view the images from the desktop.
View 2 Replies
View Related
Jul 30, 2011
How would you make NIS user information override local user information on client systems? This is what I think is right? Add nis on the passwd registration file on the second line Is this correct?
View 1 Replies
View Related
Jan 9, 2011
I'm using ArchLinux and I have an IP tables rule that I know works (from my other server), and it's in /etc/iptables/iptables.rules, it's the only rule set in that directory. I run, /etc/rc.d/iptables save, then /etc/rc.d/iptables/restart, but when I do "iptables --list", I get ACCEPTs on INPUT,FORWARD & OUTPUT.
# Generated by iptables-save v1.4.8 on Sat Jan 8 18:42:50 2011
*filter
:INPUT DROP [0:0]
:FORWARD DROP [0:0]
[Code]....
View 1 Replies
View Related
Nov 18, 2009
I want to write the shell script which
1)Finds all the databases in mysql
2)create the folder who ever is the creater of that database or owner of that database. I think the databse starts with username_ so i think i have to split the database name to get folders name . How to do that? backs up the databases belonging to that user.
View 3 Replies
View Related
Dec 12, 2010
Which distros are known to work with the new GPT partition tables as used with disks over 2TB?
View 5 Replies
View Related
Mar 11, 2010
How to configure IP tables in opensuse?My situation is,1. My network is connected in this way...ISP -> Hub -> Firewall Router -> Switches -> DNS ->LANI need to insert a linux system with iptables configured. I am expecting it that it should be between DNS and LAN. For that I am in search of "How to configure IP tables on opensuse10.3
View 2 Replies
View Related
Apr 8, 2011
translationables,i.e,camp_generic_transcamp_generic_trans_defcamp_generic_trans_epcthese tables exist in cntr1/cntr1@camABC1I have to copy these tables from here to staging environment.I need to first check if any of the tables exist in staging.If yes,then delete and create new.There are 4 staging env from 5 to 8.I have to pass the staging environment as parameter to ask the user which environment does he want the tables to be copied
View 1 Replies
View Related
Apr 8, 2011
I have 3 translation tables,i.e,camp_generic_trans
camp_generic_trans_def
camp_generic_trans_epc
these tables exist in cntr1/cntr1@camABC1
I have to copy these tables from here to staging environment.
I need to first check if any of the tables exist in staging.If yes,then delete and create new. There are 4 staging env from 5 to 8.
I have to pass the staging environment as parameter to ask the user which environment does he want the tables to be copied.
View 1 Replies
View Related
Nov 27, 2010
Everyday logwatch sends me the following information from IPTables and it seems odd, can anyone tell me are these entries odd, they all seem to be to two ports 28960 and 28964
[Code]....
View 5 Replies
View Related
Jun 29, 2010
I am trying to extract files from 2010_06_25_RT3572_Linux_STA_v2.4.0.0.tar.bz2 and every time I try to extract it it comes up with that error. I went under Applications, Ubuntu software center, typed in .tar.bz2 and installed Archive manager, Fast, multi-threaded bzip2 utility.
I am not sure what to do anymore since I have just install Ubuntu
View 8 Replies
View Related
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
Aug 23, 2010
I have linux ubuntu 10.04... and i download a .ISO of windows 7. because i want install windows 7 because i need some programs of windows for my work.. so i need make a dual boot. but the problem it's not net....
So i have a .ISO ( of windows ) and i have a notebook. ( no Drive cd. only USB PEN's ) where i can Extrat the .iso file ( windows system ) to my pen ? i cant extrait i try but nothing works.
View 13 Replies
View Related
Feb 22, 2011
I would like to extract a substring using sed.
the String is :
[1365465464.1654] fasfa fsaf df16A fas 2.2 (7/2134)
number result :
16A
View 1 Replies
View Related
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
View Related
Feb 20, 2010
How to I extract PDF Files?
View 2 Replies
View Related
Aug 25, 2010
I have a large ISO file on a server, and I need to access the file in it, without having root access. Thus, I can't simply mount it. What should I do to be able to extract an ISO on LInux without root access?
View 6 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
Mar 25, 2011
How can we extract a .rar archive in Linux?
View 2 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
Jun 19, 2010
I haven't been to this site in quite a while, since it changed from LNO in fact. Good to see this place is still around, albeit under a newer name.
I'll get on with the problem. I've got a Netgear SC101T that I was using to store my files on. Some of you may know it uses the DataPlow SAN file system. It worked fine until I installed a firmware update which, for some reason, broke the mirror array. I've hated this POS ever since and want to pull the data from the drives and toss the box. The problem is, linux doesn't have support for this particular file system scheme.
What I'm wondering is, how does 'dd' work, in regards to keeping the file system. Does it simply copy files and disregards the structure, or does it make an exact copy, DataPlow FS and all? Anyone else ran into this conundrum?
View 6 Replies
View Related
Mar 17, 2010
I need to extract a tarball but unfortunately this error occurred when I tried it
# tar zxvf toolchain.tar.gz
tar: Skipping to next header
gzip: stdin: invalid compressed data--format violated
tar: Child returned status 1
[code]....
Is there a way that I can recover or extract the tarball? I tried to gunzip first but to no avail as well.
View 2 Replies
View Related