- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- ksh - tabs or spaces problem
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
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
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
11-24-2015 12:07 AM
11-24-2015 12:07 AM
Hi,
Here is my original version, working fine
function GetVDPparameters {
ssh -T -i ~/.ssh/delphix_key cs.delphix.target@server1<< EOF
database
select ZZZ01
get
EOF
}
GetVDPparameters
relooking script using tabs does not work !
function GetVDPparameters {
ssh -T -i ~/.ssh/delphix_key cs.delphix.target@server1<< EOF
database
select ZZZ01
get
EOF
}
GetVDPparameters
Why ? Any idea ?
Regards, Den.
Solved! Go to Solution.
- Tags:
- here doc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2015 01:58 AM
11-24-2015 01:58 AM
Re: ksh - tabs or spaces problem
If you want leading tabs stripped in a here doc, you need a "-":
ssh -T -i ~/.ssh/delphix_key cs.delphix.target@server1 <<-EOF
Or put the EOF flush with the left.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2015 07:11 AM
11-24-2015 07:11 AM
Re: ksh - tabs or spaces problem
Hi, thanks for your answer. Not sure to follow you ...
This does not work too:
function GetVDPparameters {
ssh -T -i ~/.ssh/delphix_key cs.delphix.target@dlx37cti1 << -EOF
database
select NFOT01
get
EOF
}
Regards,
Denis.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2015 11:28 AM
11-24-2015 11:28 AM
Re: ksh - tabs or spaces problem
>This does not work too:
Hmm, then put the EOF flush to the left. I always do.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-24-2015 08:57 PM
11-24-2015 08:57 PM
SolutionYou have to have the redirect as: <<- EOF
The dash goes right after the last < sigh, you had a space between the last < and the '-'.
I have used tabs in here document without any issues, however it is easier to just have the EOF at the left margin and not worrry about the '-'.