- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Shell String variable maximum Length
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
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
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