- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Anyone know an equivalent to HP-UX vis command in ...
Categories
Company
Local Language
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
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
Community
Resources
Forums
Blogs
- 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
02-07-2005 05:20 AM
02-07-2005 05:20 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2005 05:45 AM
02-07-2005 05:45 AM
Re: Anyone know an equivalent to HP-UX vis command in Solaris?
Attached the excel sheet.includes equivqlent commands in Linux,hp,solaris and AIX.
regards
Syam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2005 06:02 AM
02-07-2005 06:02 AM
Re: Anyone know an equivalent to HP-UX vis command in Solaris?
Sounds like a Solaris buglette. Ask Sun for a fix?!
Or use PERL as that is most likely to be equal / similar.
If you describe the file in detail, or attach a fraction, maybe a read can help with the transformation (allhough most readers probably have a hard time trying on a Sun box).
for generic HPUX - vs - Solaris - vs - other-unix commands (like the title suggesed to me) be sure to check out:
http://bhami.com/rosetta.html
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2005 06:03 AM
02-07-2005 06:03 AM
Re: Anyone know an equivalent to HP-UX vis command in Solaris?
I tried and it worked in my solaris machine.
This is what I used.
#sed -e 's/\\(000)/ /g' < filename > new_file
only replace "filename" as applicable. The dont repace < and > characters.
This replaced the null characters with a space in my machine.Reply with your observations.
Regards,
Syam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2005 06:14 AM
02-07-2005 06:14 AM
Re: Anyone know an equivalent to HP-UX vis command in Solaris?
on HP box:
mknod /tmp/send_it_back p
remsh SUNboxname dd if=thatDBAfilename | vis > /tmp/send_it_back
on solaris box:
rsh HPbox dd if=/tmp/send_it_back | dd of=aNEWDBAfile
to UN-vis it (aka inv) just change the command and filenames:
on HP box:
remsh SUNboxname dd if=aNEWDBAfile | inv > /tmp/send_it_back
on solaris box:
rsh HPbox dd if=/tmp/send_it_back | dd of=aNEWerDBAfile
example of a tar file:
[root@HPBOX /tmp]# remsh pbsbcp dd if=/tmp/craze.tar | vis > /tmp/send_it_back
1360+0 records in
1360+0 records out
[root@SUNBOX /tmp]# uname -a
SunOS SUNBOXp 5.7 Generic_106541-23 sun4u sparc SUNW,Ultra-5_10
[root@SUNBOX /tmp]# ls -l craze.tar
-rw-r--r-- 1 root other 696320 Feb 7 08:17 craze.tar
[root@SUNBOX /tmp]# rsh vpart1 dd if=/tmp/send_it_back | dd of=/tmp/acraze.tar
1729+1 records in
1729+1 records out
1729+1 records in
1729+1 records out
then BACK again:
[root@HPBOX /tmp]# remsh pbsbcp dd if=/tmp/acraze.tar | inv > /tmp/send_it_back
1729+1 records in
1729+1 records out
[root@SUNBOX /tmp]# rsh vpart1 dd if=/tmp/send_it_back | dd of=/tmp/new_acraze.tar
1360+0 records in
1360+0 records out
1360+0 records in
1360+0 records out
[root@SUNBOX /tmp]# ls -l *craze.tar
-rw-r--r-- 1 root other 885375 Feb 7 14:00 acraze.tar
-rw-r--r-- 1 root other 696320 Feb 7 08:17 craze.tar
-rw-r--r-- 1 root other 696320 Feb 7 14:01 new_acraze.tar
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2005 06:20 AM
02-07-2005 06:20 AM
Re: Anyone know an equivalent to HP-UX vis command in Solaris?
It's not a bug of solaris, though solaris does lack features and functionality. I'm not aware of any similar solaris command for vis/inv (see man pages for inv or vis).
inv and vis are HP developed utilities. The same can be written in most languages, though perl would work fine, c would be faster.
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2005 06:26 AM
02-07-2005 06:26 AM
Re: Anyone know an equivalent to HP-UX vis command in Solaris?
Here are some examples for find and replace using perl.
go to topic 7. Substitution
regards,
Syam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2005 06:28 AM
02-07-2005 06:28 AM
Re: Anyone know an equivalent to HP-UX vis command in Solaris?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2005 06:30 AM
02-07-2005 06:30 AM
Re: Anyone know an equivalent to HP-UX vis command in Solaris?
Here is an example of what I see in the middle of the line when I use HP-UX /usr/bin/vis:
425\000\000\000\000\000\00004042
The \000 denote null characters. Once again in HP it is easy to replace these but there doesn't seem to be an equivalent functionality in Solaris. I may need to go with Harry's suggestion to code it myself in Perl. In case anyone has any ideas I have attached a single line of the file that has the null characters in it. Again I want to keep the character count the same by replacing the null characters with spaces.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2005 06:57 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2005 08:21 AM
02-07-2005 08:21 AM
Re: Anyone know an equivalent to HP-UX vis command in Solaris?
b2a.pl:
#!/usr/bin/perl
#
while (!eof()) {
$key = getc(STDIN);
$num = ord($key);
if (($num > 31) && ($num < 127)) {
if ($num == 92) {
printf("\\%03d",$num);
} else {
printf("%s",$key);
}
} else {
if ($num == 10) {
printf("\n");
} else {
printf("\\%03d",$num);
}
}
}
a2b.pl:
#!/usr/bin/perl
#
while (!eof()) {
$key = getc(STDIN);
$num = ord($key);
if ($num == 92) {
$val1 = getc(STDIN);
$val2 = getc(STDIN);
$val3 = getc(STDIN);
$key = $val1 . $val2 . $val3;
$newkey = chr($key);
$key = $newkey;
}
printf("%s",$key);
}
Sorry about the no comments. 92=\ I especially escape this out to \###. I leave NL's (newlines) alone. any non-printing character is escapeed to \###, where ### is the ascii DECIMAL value (man ascii).
Of course this can be VERY cleaned up and made more efficient!
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2005 01:01 AM
02-08-2005 01:01 AM