HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- setting ORS gives different output
Operating System - HP-UX
1825775
Members
2133
Online
109687
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2006 06:05 PM
05-02-2006 06:05 PM
Hi All,
I am executing these command.
bash-2.02# lvdisplay -v /dev/vg00/lvol3 | awk '/Distribution/,/Logical extents/ {print $1}' | grep '/dev/dsk' | cut -f 4 -d "/" | awk '{print $0}'
c2t0d0
bash-2.02# lvdisplay -v /dev/vg00/lvol3 | awk '/Distribution/,/Logical extents/ {print $1}' | grep '/dev/dsk' | cut -f 4 -d "/" | awk 'ORS=" " ; {print $0
}'
c2t0d0 c2t0d0 bash-2.02#
As you can see when i set ORS it displays the same output twice.
Why it is so?
Thanks in advance.
Prasad
I am executing these command.
bash-2.02# lvdisplay -v /dev/vg00/lvol3 | awk '/Distribution/,/Logical extents/ {print $1}' | grep '/dev/dsk' | cut -f 4 -d "/" | awk '{print $0}'
c2t0d0
bash-2.02# lvdisplay -v /dev/vg00/lvol3 | awk '/Distribution/,/Logical extents/ {print $1}' | grep '/dev/dsk' | cut -f 4 -d "/" | awk 'ORS=" " ; {print $0
}'
c2t0d0 c2t0d0 bash-2.02#
As you can see when i set ORS it displays the same output twice.
Why it is so?
Thanks in advance.
Prasad
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2006 07:05 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2006 08:20 PM
05-02-2006 08:20 PM
Re: setting ORS gives different output
Hi Prasad,
Try this, # lvdisplay -v /dev/vg00/lvol3 | awk '/Distribution/,/Logical extents/ {print $1}' | grep '/dev/dsk' | cut -f 4 -d "/" | awk 'ORS="" ; {print $0}'
-Arun
Try this, # lvdisplay -v /dev/vg00/lvol3 | awk '/Distribution/,/Logical extents/ {print $1}' | grep '/dev/dsk' | cut -f 4 -d "/" | awk 'ORS="" ; {print $0}'
-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2006 08:24 PM
05-02-2006 08:24 PM
Re: setting ORS gives different output
Thanks Peter,
After removing the ; it worked.
Basically the problem was,
The rule has been mached 2 times so, it printed 2 times.
After setting the ORS field with BEGIN it worked very well
bash-2.02# lvdisplay -v /dev/vg00/lvol3 | awk '/Distribution/,/Logical extents/ {print $1}' | grep '/dev/dsk' | cut -f 4 -d "/" | awk 'BEGIN {ORS= " "}; {
print $0}'
c2t0d0 bash-2.02#
Thanks again,
Prasad
After removing the ; it worked.
Basically the problem was,
The rule has been mached 2 times so, it printed 2 times.
After setting the ORS field with BEGIN it worked very well
bash-2.02# lvdisplay -v /dev/vg00/lvol3 | awk '/Distribution/,/Logical extents/ {print $1}' | grep '/dev/dsk' | cut -f 4 -d "/" | awk 'BEGIN {ORS= " "}; {
print $0}'
c2t0d0 bash-2.02#
Thanks again,
Prasad
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP