02-16-2009
Thanks alot but nothign really working out here.
I think I can do rest if i get solution of just this one as I mentioned below
while im doing bdf if the output is in two lines then i want to shift that in one line rest removing spaces and all i can do it using perl. Just you can see some of them are in one line and some of then are in two lines just i need help with those whose result came in two lines. something like if the value is in two lines then shift it to one line and im not able to implement it thats my problem. can be in ksh or perl i dont care.
If I can change all the outputs which are like this
/dev/vghome_old/lvol1
23552000 10375127 12353732 46% /usr/local/g1/dev/vgapp02/lvol1
into this kind of outputs like the other ones
/dev/vgapp/lvol9 25624576 23454180 2138564 92% /mps
then rest that oracle and deleting extra spaces I can handle.. just I need help in this one.
bdf_output
/dev/vg3psw/lvol9 5120000 1286387 3594077 26% /usr/local/g1_3.2_SE
/dev/vghome_old/lvol1
23552000 10375127 12353732 46% /usr/local/g1/dev/vgapp02/lvol1 153616384 100802161 49543296 67% /tuxappl
/dev/vg00/lvol6 1540096 44424 1488456 3% /tmp
/dev/vgapp-io/lvol1
199155712 153617264 45361864 77% /tlgvar
/dev/vgapp/lvol3 2097152 24344 2056680 1% /opcode
/dev/vgapp/lvol9 25624576 23454180 2138564 92% /mps
/dev/vghome_old/lvol5
5144576 185360 4649319 4% /lsms_tool
/dev/vgapp-io/lvol2
2097152 5208 2075800 0% /logs
/dev/vgdbcommon/lvol1
18432000 1517936 16786512 8% /logs/ORACLE
/dev/vghome/lvol1 62898176 54860264 8037912 87% /home
/dev/vgapp/lvol8 524288 290587 219125 57% /emc
/dev/vgd2bl12d_2/lvol3
20512768 6129 19224982 0% /csmtier1/logs
/dev/vgapp/lvol10 1048576 6334 977155 1% /csmscripts
/dev/vghome_old/lvol6
51707904 3864 51300112 0% /ora_D2BL12B_4
/dev/vg27/lvol3 204865536 197661672 7147648 97% /ora_D2BL42A_3
/dev/vg27/lvol2 307232768 26120 304806672 0% /ora_D2BL42B_2
/dev/vg27/lvol1 307232768 287320072 19757192 94% /ora_D2BL43A_2
/dev/vg27/lvol4 20578304 9825080 10669224 48% /ora_fbf_1
Just you can see some of them are in one line and some of then are in two lines just i need help with those whose result came in two lines. something like if the value is in two lines then shift it to one line and im not able to implement it thats my problem. can be in ksh or perl i dont care
thanks alot
help plz
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I'm attempting to populate an array in ksh using the following command:
set -A $(SELECT_INVOICE | sed '/^$/d')
SELECT_INVOICE is a function that executes the SQL query.
Problem: Some of the invoice numbers have alpha characters with spaces(example: OVEN MICRO). The Korn shell is treating... (1 Reply)
Discussion started by: kdst
1 Replies
2. UNIX for Dummies Questions & Answers
Can someone tell me how to execute an Oracle Stored Procedure from a Korn Shell Script.
Previously, I'm able to execute standard sql using the following:-
The_Output=`sqlplus................. << EOF
select count(*) from abc
/
... (3 Replies)
Discussion started by: Vinny_Mitchell
3 Replies
3. Shell Programming and Scripting
I want to be able to run a script on one server, that will spawn another shell which runs some commands on another server..
I have seen some code that may help - but I cant get it working as below:
spawn /usr/bin/ksh
send "telnet x <port_no>\r"
expect "Enter command: "
send "LOGIN:x:x;... (2 Replies)
Discussion started by: frustrated1
2 Replies
4. Shell Programming and Scripting
well i have this code here..and it works fine in kornshell..
#!/bin/ksh
home=c:/..../
input=$1
sed '1,3d' $input > $1.out
line=""
cat $1.out | while read a
do
line="$line $a"
done
echo $line > $1
rm $1.out
however...now i want it just in normal sh mode..how to convert this?... (21 Replies)
Discussion started by: forevercalz
21 Replies
5. UNIX for Advanced & Expert Users
Hi,
My Oracle Stored procedure returns sys_refcursor to shell script. I have to iterate through it in script and use those retrieved values further in my script. I am using K Shell Scrpting.
Stored Procedure is:
create or replace
PROCEDURE p_test(job_id IN VARCHAR2, c1 OUT SYS_REFCURSOR)... (0 Replies)
Discussion started by: rajeshorpu
0 Replies
6. Shell Programming and Scripting
Hi All
I have writing a Korn Shell script to execute it on many of our servers. But some servers don't have Korn Shell installed, they use Borne Shell.
Some operations like calculation don't work :
cat ${file1} | tail -$((${num1}-${num2})) > ${file2}
Is it possible to activate Korn Shell... (3 Replies)
Discussion started by: madmat
3 Replies
7. Shell Programming and Scripting
Enclosed is comma separated text file. I need to write a korn shell program that will parse the text file and insert the values into Oracle database.
I need to write the korn shell program on Red Hat Enterprise Linux server.
Oracle database is 10g. (15 Replies)
Discussion started by: shellguy
15 Replies
8. Shell Programming and Scripting
Could some one tell me the difference btw Bourne shell and the Kshell? Which is more flexible and reliable in terms of portability and efficiency. When i type the following command ..
$ echo $SHELL
yields me
/bin/sh
Does this tells me that I am in Bourne shell. If yes, how can i get... (6 Replies)
Discussion started by: bobby1015
6 Replies
9. Shell Programming and Scripting
I've been sent the following script to finish. It's supposed to connect to an oracle database, query it, and send an email if the query result value is one or more. Currently it isn't connecting properly, just giving the following error:
ERROR: ORA-01017: invalid username/password; logon denied... (2 Replies)
Discussion started by: jackmorgan2007
2 Replies
10. Programming
Hi All ,
I am trying to pass a value from sqlplus to korn shell .
There is a table tab1 in Oracle that has a column userdate.
I need to pass the userdate to the korn shell . This is what I am doing .
VALUE=`sqlplus -silent username/password << END
set pagesize 0 feedback off verify off... (14 Replies)
Discussion started by: megha2525
14 Replies
LEARN ABOUT SUNOS
mkdevmaps
mkdevmaps(1M) System Administration Commands mkdevmaps(1M)
NAME
mkdevmaps - make device_maps entries
SYNOPSIS
/usr/sbin/mkdevmaps
DESCRIPTION
The mkdevmaps command writes to standard out a set of device_maps(4) entries describing the system's frame buffer, audio, and removable
media devices.
The mkdevmaps command is used by the init.d(4) scripts to create or update the /etc/security/device_maps file.
Entries are generated based on the device special files found in /dev. For the different categories of devices, the mkdevmaps command
checks for the following files under /dev:
audio /dev/audio, /dev/audioctl, /dev/sound/...
tape /dev/rst*, /dev/nrst*, /dev/rmt/...
floppy /dev/diskette, /dev/fd*, /dev/rdiskette, /dev/rfd*
removable disk /dev/dsk/c0t?d0s?, /dev/rdsk/c0t?d0s?
frame buffer /dev/fb
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Obsolete |
+-----------------------------+-----------------------------+
SEE ALSO
allocate(1), bsmconv(1M), attributes(5)
NOTES
mkdevmaps might not be supported in a future release of the Solaris operating system.
SunOS 5.10 8 Oct 2003 mkdevmaps(1M)