Sponsored Content
Full Discussion: Maximum length of a string
Top Forums Shell Programming and Scripting Maximum length of a string Post 302963004 by RavinderSingh13 on Tuesday 22nd of December 2015 09:22:03 AM
Old 12-22-2015
Hello tricampeon81,

Could you please try this and let me know if this helps you.
Code:
cadena="cual es mi largo"
echo $cadena | awk '{print length($0)}'
OR
echo "cual es mi largo" | awk '{print length($0)}'

Output will be 16 in both above codes.

Thanks,
R. Singh
This User Gave Thanks to RavinderSingh13 For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Maximum file name length

Hi folks, Can anybody tell me whether there is any limit on the file name length and directory name length in UNIX. (4 Replies)
Discussion started by: rkkiran
4 Replies

2. UNIX for Dummies Questions & Answers

Maximum Command Length for Korn shell

What is the maximum size of a command which can be given in telnet command prompt in unixfor Korn shell? (2 Replies)
Discussion started by: miltony
2 Replies

3. UNIX for Dummies Questions & Answers

Maximum Command Length

What is the maximum size of a command which can be given in telnet command prompt in unix? (2 Replies)
Discussion started by: miltony
2 Replies

4. UNIX for Dummies Questions & Answers

what is the maximum length of th os-command line in Unix.

Hi All, I didn't find any thread that match this question so I hope it's not redundant. I am totally new to Unix. I want to know what is the maximum length of the os-commandline in Unix. Will it cause any problem if I run any application whose total path length is much longer than 256... (2 Replies)
Discussion started by: kumardesai
2 Replies

5. UNIX for Dummies Questions & Answers

Maximum length of a path given as an argument to a shell script

hi, I am using solaris10. I have to write a bourne shell script, which copies files for the said destination path which is passed as an argument to the script. it looks like this myscript.sh /var/test -->destination path now i would like to know what is the maximum length i can... (3 Replies)
Discussion started by: raghu.amilineni
3 Replies

6. Shell Programming and Scripting

what is the maximum length of a unix shell variable which can be can passed to plsql

what is the maximum length of a unix shell variable which can be can passed to plsql variable:( (1 Reply)
Discussion started by: alokjyotibal
1 Replies

7. UNIX for Dummies Questions & Answers

How to increase the maximum record length

Hi, I need to create a file of record length more than 300 characters. But in my unix box, i am able to create a file only with a maximum of 256 characters per record. Is there anyway i can create a file with more than 300 characters in this case? Or How to increase the maximum record... (1 Reply)
Discussion started by: mahish20
1 Replies

8. Shell Programming and Scripting

Maximum command length in bourne shell

Hi, I wanted to know what is the maximum length of command which can be run on a bourne (sh) shell? Where can I find that information? Is it different for different OS flavors? Please help. Thanks, Vineet (10 Replies)
Discussion started by: vineetd
10 Replies

9. Shell Programming and Scripting

Is there a maximum length for a shell script command?

Is there a maximum length for a shell script command? How can I detect that in my OS? For example, if I have something like: command A | command B | command C | awk '{print $1 $2 $3 $4 $5}' then can we break the commands and also the arguments inside awk ? Thanks (11 Replies)
Discussion started by: hbar
11 Replies

10. Programming

Maximum length of a line

How can I change the maximum length of a programming line in fortran and C (specifically in fortran 77)? Seems the default maximum length is 72 in fortran 77. Thanks. (4 Replies)
Discussion started by: hbar
4 Replies
CUYO(6) 							   Games Manual 							   CUYO(6)

NAME
cuyo - Tetris-like game with many suprises SYNOPSIS
cuyo [-d] [-f] [-g widthxheight] [-h] [-?] [--version versions] [ld-file] cuyo -? DESCRIPTION
Use A, D, W and S or the arrow keys to move left, move right, turn and drop the falling piece. Try to put blobs of the same color together. (You don't need to form rows or columns. Any shape will do.) When enough blobs of the same color are connected, they explode. (What "enough" means depends on the level.) Try to make explosions next to the the grass (or whatever there is in the level instead of the grass). Then, it will explode, too. The level is finished when no grass is left. In some levels, you will need a chain reaction to get rid of the grass-equivalent. And many other things may happen in other levels. In two-player-mode, each time one player causes an explosion, the other one gets grey things (which explode when something else explodes next to them). If one player builds a too big tower, the other player may get one of his rows. OPTIONS
-d Debug mode. -f Fullscreen mode. -g widthxheight Set the window size. -h Print a short help message and exit with status 0. -? Print a short help message and exit with status 1. --version versions, --version=versions Activate special versions of levels and level tracks. versions is a comma-separated list of version specifiers. Version specifiers pertaining to difficulty setting, numbers of players, and level tracks can also be set from the main menu. See the cual(6) manpage for the relevant values. The other version specifiers which are actually used in levels are eco and geek. eco makes a very few levels less resource-hungry. In the consequence, they also become less beautiful. If you're trying to design own levels, you can pass the name of your .ld file (level description file) to test the level. If you do that, this will be the only available level. CREATING NEW LEVELS
The main work is to draw all those little icons. Then you have to create a level description file which tells cuyo how to put everything together. There is an example level with many comments. Its description file is example.ld. (It should be part of the cuyo distribution and probably lies in the same directory as the other cuyo level description files.) It is rather outdated but may still be a good starting point. Other Sources of information are: - Try man cual. Cual - the Cuyo Animation Language - is the format of level description files. - And of course, there are the level description files of the existing levels (files ending in .ld, probably located somewhere like /usr/share/games/cuyo/). SEE ALSO
cual(6) BUGS
The level description language is still under development. In the preferences dialog, some keys are not displayed correctly. The AI Player is not very intelligent. In particular, it doesn't understand most of the special features of the levels, and so, it some- times behaves very silly. See the TODO file for other bugs. AUTHORS
Mainly Immanuel Halupczok <cuyo@karimmi.de>. Other contributors to the source code: Bernhard R. Link, Mark Weyer, Bernhard Seckinger. Other contributors of levels: Daniela Lipps, Simon Huggenberger. 2012-1-27 CUYO(6)
All times are GMT -4. The time now is 07:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy