HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: passing variables through remsh
Operating System - HP-UX
1834149
Members
4012
Online
110064
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
10-28-2002 10:11 AM
10-28-2002 10:11 AM
Hi all
Probably someting really simple, yet I can't seem to work out why it won't work
If I try this from the command line it's ok
disk=$(sudo /usr/sbin/vgdisplay -v vg00 | grep -i 'pv name' | awk '{prin
t $3}' | sed 's/dsk/rdsk/g')
echo $disk
/dev/rdsk/c0t5d0
sudo /usr/sbin/diskinfo $disk
SCSI describe of /dev/rdsk/c0t5d0:
vendor: SEAGATE
product id: ST31230W
type: direct access
size: 1027432 Kbytes
bytes per sector: 512
Ok
If I try this from a script (as I have a few to do)
#!/usr/bin/sh
for file in $( do
echo "---------------------------------------" >> info
echo $file >> info
remsh $file -n 'sudo uname -a ;model;sudo /usr/sbin/ioscan -funCtape'>> info
remsh $file -n 'disk=$(sudo /usr/sbin/vgdisplay -v vg00 | grep -i 'pv name' | awk '{print $3}' | sed 's/dsk/rdsk/g');sudo /usr/sbin/diskinfo $disk' >> info
done
I get
grep: can't open name
syntax error The source line is 1.
The error context is
>>> {print <<<
awk: The statement cannot be correctly parsed.
The source line is 1.
awk: There is a missing } character.
Usage: diskinfo [ -b | -v ] filename
is a character special device file
-b to obtain disc size (in 1K blocks)
-v verbose mode
Any ideas ?
Just off to play squash, will reply when I get back
Thanks in advance
Steve
Probably someting really simple, yet I can't seem to work out why it won't work
If I try this from the command line it's ok
disk=$(sudo /usr/sbin/vgdisplay -v vg00 | grep -i 'pv name' | awk '{prin
t $3}' | sed 's/dsk/rdsk/g')
echo $disk
/dev/rdsk/c0t5d0
sudo /usr/sbin/diskinfo $disk
SCSI describe of /dev/rdsk/c0t5d0:
vendor: SEAGATE
product id: ST31230W
type: direct access
size: 1027432 Kbytes
bytes per sector: 512
Ok
If I try this from a script (as I have a few to do)
#!/usr/bin/sh
for file in $(
echo "---------------------------------------" >> info
echo $file >> info
remsh $file -n 'sudo uname -a ;model;sudo /usr/sbin/ioscan -funCtape'>> info
remsh $file -n 'disk=$(sudo /usr/sbin/vgdisplay -v vg00 | grep -i 'pv name' | awk '{print $3}' | sed 's/dsk/rdsk/g');sudo /usr/sbin/diskinfo $disk' >> info
done
I get
grep: can't open name
syntax error The source line is 1.
The error context is
>>> {print <<<
awk: The statement cannot be correctly parsed.
The source line is 1.
awk: There is a missing } character.
Usage: diskinfo [ -b | -v ] filename
-b to obtain disc size (in 1K blocks)
-v verbose mode
Any ideas ?
Just off to play squash, will reply when I get back
Thanks in advance
Steve
take your time and think things through
Solved! Go to Solution.
1 REPLY 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2002 10:18 AM
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
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP