shell切分字符串到数组 问题: 对于’aa,bb,cc,dd,ee’这样的字符串输出采用,分隔开的aa bb cc dd ee aa:bb is ok:/home/work按照":"分割开来的aa bb is ok /home/work 解决方法1: #!/bin/bash var=’aa,bb,cc,dd,ee’ var=${var//,/ } #这里是将var中的,替换为空格 for element in $var do echo $element done…
参考网址:https://blog.csdn.net/yenange/article/details/39637211 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data; namespace Study { public static class Program2 { static void Main(string[] args) { st…
int pageSize=5; var array = new List<string>(); ----------方法1-------------------- var pageCount = (int)Math.Ceiling(1.0 * small.Length / pageSize); for (int i = 0; i < pageCount; i++) { var bb = small1.Skip(i * pageSize).Take(pageSize).ToArray();…