Three methods about calculate string length

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Three methods about calculate string length相关的知识,希望对你有一定的参考价值。

#! /bin/bash
for i in I am oldboy linx welcome to our training ;do
if [ echo ${#i} -ge 6 ];then
echo $i
fi
done

for i in I am oldboy linx welcome to our training ;do
if [ echo $i|wc -L -ge 6 ];then
echo $i
fi
done

for i in I am oldboy linx welcome to our training ;do
if [ expr length $i -ge 6 ];then
echo $i
fi
done

以上是关于Three methods about calculate string length的主要内容,如果未能解决你的问题,请参考以下文章

stored information about method csdn

A Simple Example About Privileged Methods in JavaScript

Three methods to read file

Medical Three Way Stopcock : 3 Application Methods

About use Runtime Method Invoke and Runtime Source Code Compliation

2Learn about images & containers