- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- suggestion required for the out put of the script
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
03-10-2015 01:51 PM - last edited on 03-11-2015 06:54 PM by Maiko-I
03-10-2015 01:51 PM - last edited on 03-11-2015 06:54 PM by Maiko-I
Hello Experts ,
I have a script which tellls about the java & perl version.However when ran the script the output was not proper.
I need to know what shall be done in the script so that the oupt put will be proper,at least a space after every line.
Below is the script & attaching the output of the sctipt.Please suggest.
#!/usr/bin/ksh
# sets environment variables
. cv c11jpb
# Displays LAW_JAVA_HOME value, Java version, which Java is being used, Perl version and which Perl is being use
echo $LAW_JAVA_HOME
java -version
which java
perl -version
which perl
Thanks & regards,
Vishal
P.S. This thread has been moved from HP-UX > System Administration to HP-UX > languages. - Hp Forum Moderator
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2015 02:14 PM
03-10-2015 02:14 PM
SolutionIf you want a blank line between the output of each command just add an echo between each command.
For example:
#!/usr/bin/ksh
# sets environment variables
. cv c11jpb
# Displays LAW_JAVA_HOME value, Java version, which Java is being used, Perl version and which Perl is being use
echo $LAW_JAVA_HOME
echo " "
java -version
echo " "
which java
echo " "
perl -version
echo " "
which perl
************************
If you want a bit more information for each command:
#!/usr/bin/ksh
# sets environment variables
. cv c11jpb
# Displays LAW_JAVA_HOME value, Java version, which Java is being used, Perl version and which Perl is being use
echo "Command = echo LAW_JAVA_HOME"
echo $LAW_JAVA_HOME
echo " "
echo "Command = java -version"
java -version
echo " "
echo "Command = which java"
which java
echo " "
echo "Command = perl -version"
perl -version
echo " "
echo "Command = which perl"
which perl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2015 05:45 AM
03-11-2015 05:45 AM
Re: suggestion required for the out put of the script
Thanks a ton Patrick...it really helps me out.
With best regards,
Vishal