Debian Programming :: Generate SQL Result Into XML

Dec 2, 2014

How do I generate sql result into xml ? Tried this way (shown below), but it generates all data into single column.

Code: Select allgenerate_xml()
{
        f1=_tmp1
        f2=_tmp2
        cat $SQL_QUERY_OUT |sed -e 's/^"//g;s/"$//g;s/","/|/g'|tr '|' ' ' > $f1
        [ -e $SQL_QUERY_OUT ] && rm $SQL_QUERY_OUT

[code]....

View 2 Replies


ADVERTISEMENT

General :: CLI Commands To Generate Random Result From Specified List?

Jul 20, 2011

List of 77 lines with the names of movies. For ease, let's say it's in a text file. What I want is a command line argument I can pass that'll read each line and pick one of those 77 lines at random, except I can't figure out how to do this. Is there a program I can just pipe the output of 'cat listofmovies.txt' to?

View 13 Replies View Related

Debian Programming :: GCC Can't Generate 64 Bit Program On Wheezy Mips64?

Dec 21, 2014

I have both 32 bit and 64 bit libs installed with gcc multilib.

I tried following options, but the result is still a 32bit elf:

# cc -mips64 -mabi=o64 -mlong64 -mgp64 -c gendian.c
# file gendian.o
gendian.o: ELF 32-bit LSB relocatable, MIPS, MIPS64 version 1 (SYSV), with unknown capability 0xf41 = 0x756e6700, with unknown capability 0x70100 = 0x1040000, not stripped

The machine is running 64 bit os:

# uname -a
Linux debian 3.2.0-4-5kc-malta #1 Debian 3.2.63-2+deb7u2 mips64 GNU/Linux

Both 4.6 and 4.7 gcc have been tried, and both have the same issue.

Fixed: need -mabi=64

View 0 Replies View Related

Programming :: Get Different Result Of Matrix Op On Hw Rtw Book?

Jul 31, 2011

Dear Linux/c++/g++ programmers: the run result on my system, ubuntuLinux10.04(kernel2.6.35-25), gcc4.5.2 is not what book predict

source code
http://examples.oreilly.com/9780596007614/
11-28
11-29
11-24
#include "matrix.hpp"

[Code]...

View 13 Replies View Related

Programming :: Cut The String In The Result Generated By AWK?

Aug 5, 2010

I wanted to get the ORACLE_HOME of the listener's running on the server.I have been using the following to get the reult. /opt/oracle/admin/PHYPE/bdump> ps -ef|grep /bin/tnslsnr|grep -v grep|awk '{print $9}'

Result is as follows

/opt/oracle/product/10.2/bin/tnslsnr
/opt/oracle/product/9.2.0/bin/tnslsnr
/opt/oracle/product/10.2/bin/tnslsnr
/opt/oracle/product/10.2/bin/tnslsnr
/opt/oracle/product/9.2.0/bin/tnslsnr
/opt/oracle/product/10.2/bin/tnslsnr

Now i wanted to cut the /bin/tnslsnr part and the remaining should write to the file.

View 4 Replies View Related

Programming :: Setting The Final $result

May 18, 2010

I have a variable (call it $valAS) that gets calculated . Also, i have a files Bassu3. if $valAS= 45368 (2nd part of 2nd line in Bassu3) after calculation, then $result=45368, but if $valAS != 45368 then $result= $valAS

Bassu3:

Quote:

name.srv
name 45368 (value always changing)
name 99999
name 88888

how can i do this in Bash?

View 14 Replies View Related

Programming :: Specific Result Of Awk Script

Jan 24, 2010

I'm using the following awk command to find out the users home directory from /etc/passwd file.#grep jeesun /etc/passwd |awk 'BEGIN {FS=":"};{print $6}'But problem is when there are two name like "jeesun" and "jeesunadm" exist the script shows both result not specific one.

View 3 Replies View Related

Programming :: Show Images From A Database Result?

Jun 17, 2010

I was wondering if I can show an image on our php site if we store the path to it. For example if we get the result form my sql as:

images/example1.png and the handle the result as common html.

< img src="databaseresult" width="173" height="188" border="1" / >

is this possible? do you think theres a better way to do it?

we need to store the images locally we cant use a blob space on the table.

View 2 Replies View Related

Programming :: PHP / MySQL Statement - Query Result

Jan 29, 2011

It is under PHP/MySQL
$queryresult = $conn->query("INSERT INTO normalrequests VALUES($finalkey, 1234, 5678, FALSE)");
It is connected to the database successfully but I feel there is something wrong with the statement up there.

View 6 Replies View Related

Programming :: Pass An Expect Command Result Into A Variable And Then Use It Again?

May 4, 2010

I'm trying to create a program that would locate the oldest file of a certain type on a server. Here's the commands:

OLDEST_PATH=`find -L / -depth -maxdepth 6 -mindepth 6 -type d | sort -f | head -1`
OLDEST_FILE=`find -L $OLDEST_PATH | grep .mp3 | sort -f | head -1`
ls -al $OLDEST_FILE

I'm writing this all in expect but I'm having problems. The main problem I have is whenever I try to run the first command, I can't seem to isolate the result of the OLDEST_PATH so that the 2nd command will work. There always seems to be a newline in the variable and the result is only "find -L" command running and it bypasses the variable. If I can just figure out how to get the 1st and 2nd command to work, then I can figure out the 3rd. Here's some code:

Code:
send "find -L / -depth -maxdepth 6 -mindepth 6 -type d | sort -f | head -1
"
sleep 20
expect -re "(.*)

[Code]....

I know there is a better way to write this. I've tried multiple ways and this just happens to be the last way I've tried it. If you try running this, you'll notice that there is still carriage returns after the result of OLDEST_PATH and it prevents the 2nd "find" command from working properly.

View 2 Replies View Related

Programming :: Print Cgi Result (loan Calculator) Using Popup

Jan 7, 2010

I am using the script below but need to make it to show the result in a html popup window. The script is Free and I don't think Kristina will complaint by making it more versatile.

The problem I have is that the script moves to a standalone window to show the results. I am interested in making it "popup' a window with the results.

Code:
#!/usr/bin/perl
# NOTE: You must change the line above to point to the path to Perl
# on your system.
#########################################################################
##### AffordaBilly v1.0#
##### Copyright 2001, Kristina L. Pfaff-Harris, scripts@tesol.net#

[Code]....

View 1 Replies View Related

Programming :: String Concatenation In Perl Result In Two Lines - Not One?

Jan 11, 2010

I am new to perl and am having trouble adding some strings together.

My full code is below:

The problem is $NewCommandB is always split into two lines, where the second line contains the "/atlas2/<blah>/<etc>/..." string. Since I am generating a .sh file to execute a lot of similar commands I need the string to all be on one line. Any idea why I get this behaviour and any suggestion on how to tell perl to make $NewCommandB a one line string?

Btw for completeness finalFileList.txt contains just file names one line after another:

View 5 Replies View Related

Programming :: How To Generate MD5 / Sha-1 With Perl

Mar 31, 2010

How can I generate a md5 or sha-1 code with perl?

View 2 Replies View Related

Programming :: Change A Mysql Query Result Prior To Display?

Oct 17, 2010

I am not sure if this is possible. I have IP's stored in a mysql database. When I query the database, it returns the IP. I would like to replace the IP with something else prior to displaying the results. Is it possible even though I have not stored it in the database?

I have the following in a while loop (mysql_fetch_array).

Code:
<td align="left">' . $row[IP] . '</td>

Instead of displaying $row[IP] from the database, I would like it to display something else which I define in the PHP code but based on the IP.

ie. aaa.bbb.ccc.ddd = hostnameABC

View 4 Replies View Related

Programming :: Splitting A Parent Process Into 2 Child And Then Merging Result?

Sep 15, 2010

What i am trying to do is i want to add numbers from 1 to 100. but that too using multiprocessing. So i made a c programme and using fork() command made two child processes. Now in one child process i am adding from 1 to 50. and in another i am adding 51 to 100. and then in the parent process adding the two results to get the final one. Now the result from the two function i am getting correctly. But after the wait() call the value returned is lost : See the programme below for reference

# include<stdio.h>
# include<unistd.h>
# include<sys/wait.h>
# include<stdlib.h>

[code].....

View 6 Replies View Related

Programming :: Generate Excel Charts From C?

Feb 24, 2011

Does anybody know how to generate excel charts from C, or if it's possible at all?

For example, if I had 2 arrays that I wanted to export to excel and graph against each other. I know how to export it to a csv file, that's no problem, but I have no idea where to start with generating a graph of the data. I can't seem to find any examples anywhere.

I'd appreciate if someone could point me in the right direction.

Just a simple example to show you what I mean code...

View 10 Replies View Related

Programming :: Script To Generate Vouchers?

Jun 24, 2010

I have a file, two columns, first column has a list of 15000 (yes 15k) unique codes, second column has the afilliate codes of 60 locations repeated to fill out the 15000 rows of unique codes. I need to produce a nice neat paper voucher which will fit onto A6 (1/4 A4) and is ready to print. Each voucher has the unique code and corresponding location. So far I am thinking PHP will do the job. This does it somewhat, but doesn't let be split the fields between the ",". I did this so far in PHP

[Code]...

View 3 Replies View Related

Programming :: Generate Pdf In Thai Language?

May 19, 2009

I am trying to generate pdf in thai language. i have installed thai package (extension in babel package). It is finally generating pdf in thai. but thai string are cming very long as compared to original string given in .tex file.

View 3 Replies View Related

Programming :: Using /dev/random To Generate Double?

Mar 6, 2010

I need to generate random numbers using /dev/random in C. The numbers should be of type double (64-bit floating point).The functionality should be equal to linux command "od -An -N8 -t fD /dev/random", but written in C.The prototype should be "double drand(void);".

View 7 Replies View Related

Programming :: Script To Generate Random Dates?

Aug 3, 2010

A script to generate random dates. It uses the year range 2006-2009, and truncates every month of the year to an ordinary February's 28 days, but otherwise it's pretty solid and safe.

Code:
spate=1
while [ $spate -le 120 ]

[code]....

View 1 Replies View Related

Programming :: Running Some Script To Generate Below Values?

Mar 24, 2011

We are running some script to generate below values however we don't need the first level output as it always shows cpu % as 0.0.

(We dont need following part:
NAME STATE CPU(sec) CPU(%)
XXX -----r 55567 0.0

[code]....

View 10 Replies View Related

Programming :: Script To Generate SSH Banner MOTD?

Apr 18, 2010

I want to automate my System-installation. So i try to make a Script that will generate the /etc/motd. Now i have the Problem that the script has some variables and after the "Hostname, OS, HW, IP" the "stars" are anyware, but not there they should. The most problem is the $OS this string can verry long or verry short be. Fedora release 12 (Constantine) or RedHat 5.4 i can do that after the variables place the "stars" on the write position?

Script
Code:
#!/bin/bash

[code]....

View 6 Replies View Related

Programming :: Tool To Generate Class Diagrams?

Sep 7, 2010

I have some c++ code and want to generate class diagrams using some tool which would scan the c++ code and generate diagrams. Is there any such open source tool to be used on linux machine?

View 1 Replies View Related

Programming :: Write A Program In C Which Will Generate A Maze Randomly ?

Oct 8, 2010

I want to write a program in C which will generate a maze randomly and find the solution for it ..

The idea behind is in [url]

How the 16 bit integer is stored in a variable..Earlier I wrote a program on trees and displayed it using dotty.. Is there any such tool to display a maze..I am using ubuntu 10.04.

View 1 Replies View Related

Programming :: Generate Alphanumeric Characterlist - No Repeating More Then 3 Times?

Apr 5, 2011

i have spotted that script (something similar that i am looking for)

[URL]

and i just dont know how to use it.I am not a programmer myself and probably no need for learning that just to create one script! modify "wje_lq" script and run it. thing like : "Just redirect standard output to a file in the normal manner" ? and all this

I.Comment out the first definition of *character-set*, by adding a semicon at the beginning of the line.

II.Uncomment the second definition, which just uses "ABC", by removing the semicolon from the beginning of the line.

III.Comment out the first definition of *word-length*.

IV.Uncomment the second definition, which uses a word length of four.

i would like to generate :

10-character combinations of the following characters (lowercase) 23456789abcdef with no more then 3 same letters repeates no metter side by side or within one line (sequence) so lets say

abcdef1234 accept
fabcde1234 accept
ffabcd1234 accept

which is probably permutation with repetable string ( where abc is not equeal to cba etc .so ti speak position does metter)

fffabc1234 not acceptable -----(3 same characters)
ffabcf1234 not acceptable -----( 3 same characters event thought not side by side)

we dont want 3 same characters apper in same line.

View 2 Replies View Related

Programming :: Reading Lines To An Array And Generate Dynamic Zenity List?

May 18, 2011

explanation what I want to do exactly:I have a textfile which looks for instance like this:

file.txt:
...
something=else to do

[code]....

View 14 Replies View Related

Debian :: Preload Take Long Time To Give Result?

Jan 8, 2010

i got intel inside. when grabbing windows and moving them around they "streaked "(right word ?) over the monitor. Desktop-experience was simply "sluggish". I searched for all kind of info on this board. e.g.: installed preload, intel-microcode, set Xwrapperconfig to -1; -5, -10. tried some changes with swappines and cache_pressure in sysctl.conf. without knowing what it might be good for i ran prelink -a. For about a week it simply rocks: all is "sharp" and clean, including the move of windows. How come? does preload take such a long time ( a few months) to give such an amazing result? Is it related to graphics at all? I upgraded to ext4 bout 4 weeks ago (which takes a while too, from what i have read). intel-microcode doing magic? With the money i got chances are high that the pc`s i buy are intel-inside ones. and with a build-in graphics-card

View 14 Replies View Related

Debian :: Generate Directory List With Exclusions?

Aug 18, 2011

I'm trying to generate a list of my music directory folder structure WITHOUT the files included. I have my music directory set up in a hierarchy of Artist>Album>Files, and I just want to generate a list of the folders because that will, in effect, output a list of what albums I have by what artists, which is ultimately what I'm after. I did some looking on the internet through various forums over the past few days and found two ideas that looked promising, but ended up being not exactly what I needed. The first was to generate a .txt file based off of a shell ls command:

ls -R [music directory name] >> ~/mymusiclist.txt

That's great, except that it also includes the 40,000+ individual music files by name. I'm not about to invest that much time editing the files out of the list when I know there has to be an easier way.The second idea I came upon involved using the extglob function. I tried enabling extglob and using it to input a "negative wildcard" into the above method to remove anything .mp3 from the returned list, but extglob didn't play well in that context. I'm not a command line wizard, so it's entirely possible that I'm missing something fairly obvious. In fact, I'm sure I am. So this is a great opportunity for me to learn something new. If anybody knows of a command line way to do this, I'd love to know it. Or, even better, if anybody knows of an app that can do this, even better. I'm not above installing a secondary music player just to import the library once and get my list.

View 3 Replies View Related

Debian :: Util To Generate Thumbnails / Contact Sheet From Video?

Apr 1, 2011

I'm looking for suggestions for a command line utility than can generate a contact sheet (e.g. jpg etc) from a video? I'm mainly interested in starting from FLV files, but i guess the solution will probably work for other formats with appropriate codecs etc. So, for example, if i have a 30 minute video, every 2 minutes through it i'd like it to generate a thumbnail and then put 15 of these in a 5 x 3 grid in a single jpg. On Windows,Media Player Classic Homecinem will do this through its ave Thumbnails command.

Ideally i'd like to do this from the command line/script in a debian server environment, rather than a desktop GUI. It doesn't have to be a single command, if a chain of steps could do it.

View 2 Replies View Related

General :: ./checksetup For Bugzilla3 On Debian 5.0 Generate Permission Denied?

Jan 18, 2011

When I attempt to run a ./checksetup.pl I am getting the following error message.

Creating /var/lib/bugzilla3/data/pdsphaseibugs/attachments directory... mkdir /var/lib/bugzilla3/data/pdsphaseibugs/attachments failed: Permission denied at /usr/share/perl5/Bugzilla/Install/Filesystem.pm line 385.

The script su to www-data and here is a copy of the directory the script is executed from :

fuidsg46:/usr/share/perl5/Bugzilla/Install# ls -la
total 276
drwxr-xr-x 2 root www-data 4096 2011-01-11 12:17 .
drwxr-xr-x 16 root root 4096 2011-01-11 12:17 ..

[Code]....

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved