12-19-2012
Thanks for the suggestion. But it made a horrible hash of a sample data set :-(
I've found there's another issue... not every query result necessarily contains all of the attributes. There are items in some results that are not in others.
I'm trying to think of a way to harvest all possible attributes in each set of returns, and then inject each result into an array or something and include a null value for any missing attributes. There is a finite set of possible attributes, and I could pre-build them into my script, but creating that dynamically is a better long-term solution in case attributes are added or removed in the future.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all,
Can somebody please offer some advice. I'm working on a small script to list all packages on the local and remote systems and need it in the following format.
Machine Name, Package, Version
Here is what i have so far but i can't seem to get the output of the hostname to loop to... (3 Replies)
Discussion started by: liketheshell
3 Replies
2. Shell Programming and Scripting
Dear readers,
I have a script that counts the number of files in particular directories in my home location and displays the output. Now I have 13 directories in my home location. I am getting the output as :
Avishek_dir 13
Kunal_dir 17
Shantanu_dir 18
Arup_dir 12
Pranabesh_dir 19
.
.... (7 Replies)
Discussion started by: avishek007
7 Replies
3. Shell Programming and Scripting
Hi,
We have 2 scripts below for reporting sar output which are pretty same.
In first script i want to add to the program whatever is given in the comments.
In second script I want to use while true to run this program every hour and everything that is in comment.
Finally I want to club... (0 Replies)
Discussion started by: noorm
0 Replies
4. Shell Programming and Scripting
Hi All,
I'm finding it difficult to format the query output that was returned in a shell script.
Actually i have one shell script which does some DB stuff and depending on the result it will do some more tasks. My question here is to format the query output returned by mysql.
Intitally my... (5 Replies)
Discussion started by: RSC1985
5 Replies
5. Shell Programming and Scripting
Hi,
I need to connect to the database and retrieve two variables from the database and store them in a variable,out of these two variables I need to get lastdigit appended to the variable 1 retrieved and variable 2 with out any modification
in short
select var,data from usage;
o/p=... (1 Reply)
Discussion started by: rkrish
1 Replies
6. Shell Programming and Scripting
Hey can anyone help me with newline formatting?
i bet someone will ask why im rewriting du code, im trying to write a simple script that have slightly different function than du lol....
echo $(du "$dval" | tr ' ' '\n')
atm with above code it will printout
i've tried sed and awk... cant... (7 Replies)
Discussion started by: Nick1097
7 Replies
7. Shell Programming and Scripting
Hi Guys..
Need your help to format the output of my shell script.
I am using spool command to take out put in csv file.
below is my code. (for example)
col USERNAME for a15
col EMAIL for a30
col FULL_NAME for a20
col LAST_LOGIN for a40
col DATE_CREATED for a40
SPOOL 120.csv... (3 Replies)
Discussion started by: Agupte
3 Replies
8. Shell Programming and Scripting
I am facing a problem formatting the output of my shell script in excel.
We are directing the output of the script to an excel sheet and need long integer type data printed in Excel as it is (i.e. not in the default scientific notation).
Also, leading zeroes(if any) in the output are getting... (4 Replies)
Discussion started by: bornali.p
4 Replies
9. Shell Programming and Scripting
Hi All,
#!/bin/ksh
call_sql ()
{
sql=$1
sqlplus -s $sqlparam_sieb <<EOF
SET ECHO OFF;
SET NEWPAGE NONE;
SET SQLBL OFF;
SET VERIFY OFF;
SET LINESIZE 2000;
SET... (2 Replies)
Discussion started by: Kevin Tivoli
2 Replies
10. Shell Programming and Scripting
When i execute the below shell script with 2 different Input files, for one of the data files (datafile1) my email message body in the outlook messes up and every thing comes up in one line. May i please know what i am doing wrong here or how to fix this? The only difference in data files is one is... (1 Reply)
Discussion started by: Ariean
1 Replies