Display the string issue


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Display the string issue
# 1  
Old 02-09-2010
Display the string issue

Hi,
i ran following bdf command and found below out with space uses.


Code:
prd@prd02/usr/apps/cti>bdf | grep /usr/apps


/dev/vg01/lvol6    17379328 9873783 7036696   58% /usr/apps
/dev/vg01/SYBASE   1228800  978631  234597   81% /usr/apps/sybase
                   2150400 1108516  976776   53% /usr/apps/sybase/devw
/dev/vg01/lvol1    6144000 2305257 3598867   39% /usr/apps/sybase/cti/dump
                    204800  144517   56522   72% /usr/apps/sybase/cti/data
/dev/vg01/logs     1048576  261540  737912   26% /usr/apps/logs
/dev/vg01/lvol17    512000   59678  424099   12% /usr/apps/data
                   10207232 8263936 1887024   81% /usr/apps/MAX


now i would like to fetch the only use space value only(i.e like only % value)

so could you please tell me how can i fetch the % value only from above out put.

Last edited by pludi; 02-09-2010 at 07:43 AM.. Reason: code tags, please...
# 2  
Old 02-09-2010
Code:
bdf | awk '/\/usr\/apps/{print $5}'

# 3  
Old 02-09-2010
Hi
i ran below command
Code:
bdf | awk '/\/usr\/apps/{print $5}'

out put like:
Code:
58%
81%
/usr/apps/sybase/ctidevw
39%
/usr/apps/sybase/ctidevw/data
26%
12%
/usr/apps/MAX

i want only uses of space values only

Last edited by Scott; 02-09-2010 at 09:43 AM.. Reason: Code tags, PLEASE!
# 4  
Old 02-09-2010
check this...
Code:
bdf | awk '/\/usr\/apps/{print $(NF-1)}'

what do you mean by space values?
can you show your desired output if this is not what you want?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

AIX Fonts and Display issue

Hello Everyone, have a question regarding fonts: #env root@oraapp:/>env _=/usr/bin/env LANG=ar_AA LOGIN=root SSH_TTY=/dev/pts/1 PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java131/jre/bin:/u ... (2 Replies)
Discussion started by: filosophizer
2 Replies

2. UNIX for Beginners Questions & Answers

Search a string and display its location on the entire string and make a text file

I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file. Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies

3. UNIX for Dummies Questions & Answers

Prompt path display issue

I use the following command to print the current directory above the command prompt set prompt="`exec pwd`\n$USER@`hostname -s` %B: % > " The output is something like this <current path> $USER@hostname > But when I try to CD to any other directory and press the return key, the... (6 Replies)
Discussion started by: aelhosiny
6 Replies

4. Shell Programming and Scripting

Script with ^M causes display issue with cat or more

I have a script to do a couple simple but repetitive commands on files that are provided to us. One of the things is to get rid of the line feeds. This is the section that is causing problems, i even cut this section into its own file to make sure nothing else was affecting it. #!/usr/bin/bash... (4 Replies)
Discussion started by: oly_r
4 Replies

5. UNIX for Advanced & Expert Users

Unix terminal display related issue

Want few input related to unix environment and terminal settings: 1. Am trying to find a way to keep the unix terminal display intact even after opening and closing a vi/less file. Currently if I open a vim file in the unix terminal and then close the file,it displays the contents of vim file on... (4 Replies)
Discussion started by: talktovkjain
4 Replies

6. AIX

New to Unix - display issue

new to the forums hope is this the right area to post this, I have 4 IBM servers (inherited) and all of them are connecting through a KVM. Probelm is all the servers are fuzzy on the monitor. I have tried switching multiple monitors and all get the same effect no matter if they are wide screen or... (4 Replies)
Discussion started by: Setnaro
4 Replies

7. Programming

Display issue when we print in for loop

Hi All, I have connected to the board using telnet, when i tried to display huge record which has more then 1000, this telnet session where overlapping the printed data to the previous line. Can some one help me how to solve this? For example" in a for loop i am printing "1 Name1"... (3 Replies)
Discussion started by: mohi
3 Replies

8. Linux

Display issue

Hi, After installing red hat linux(ppc version) on power series server,running export DISPLAY=IP:0.0 and after that xclock command I am getting can't open display error Please suggest. (2 Replies)
Discussion started by: manoj.solaris
2 Replies

9. UNIX for Dummies Questions & Answers

Display issue.

Hi All, I run this command ps -ef | grep daemon. This just returns half info on the page. Like. User 10888 1 0 23:04:58 ? 0:44 /opt/xxxxx/bin/perl /home/xxxxx/s After the "/s "at the end of the line it should continue. But it's not displayed. And can't even grep for the name... (1 Reply)
Discussion started by: preethgideon
1 Replies

10. UNIX for Dummies Questions & Answers

display went awkwards after issue kill pid

hi, i kill a process which is topas. then i do a fg of the process itself and got this Signal 15 received.finally, the display went as belows.... root@myhost:/]ksh: ^L^L^Lps: not found. root@myhost:/] PID TTY TIME CMD ... (4 Replies)
Discussion started by: yls177
4 Replies
Login or Register to Ask a Question