- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Shell String variable maximum Length
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
Discussions
Forums
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
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
тАО08-08-2003 04:12 AM
тАО08-08-2003 04:12 AM
I would like to know is there any maximum length for a string variable in POSIX shell. I am not sure howmany characters are my query going to return to the variable.
Thanks in advance.
Regards
Shaji
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2003 04:25 AM
тАО08-08-2003 04:25 AM
Solutionlength is 256.
#!/usr/bin/ksh
read linestuff
echo "--------------------------------------------------"
dummy=${#linestuff}
echo length is $dummy
echo "--------------------------------------------------"
echo $linestuff
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2003 04:30 AM
тАО08-08-2003 04:30 AM
Re: Shell String variable maximum Length
I can only achieve 255, and that is including variable name and equal sign - but one does not make a big difference to me.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2003 04:32 AM
тАО08-08-2003 04:32 AM
Re: Shell String variable maximum Length
-ux
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2003 06:10 AM
тАО08-08-2003 06:10 AM
Re: Shell String variable maximum Length
if your wondering about the string lenght of a a variable, ie a="abcdef", the string length of a (${#a}) is 6 characters.
my testing with
read var
the shell on my old desktop system running 11.0 runs into memory problems when the file/string is >5M
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-08-2003 07:16 AM
тАО08-08-2003 07:16 AM
Re: Shell String variable maximum Length
Regards
Shaji