免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1622 | 回复: 0
打印 上一主题 下一主题

[puppet] 一个命令seq分享下 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-04-25 16:36 |只看该作者 |倒序浏览
本帖最后由 asdgzw 于 2013-04-25 16:37 编辑

  $ rpm -qif `which seq`

  Name : coreutils Relocations: (not relocatable)

  Version : 5.2.1 Vendor: Red Hat, Inc.

  Release : 31.2 Build Date: Mon 20 Jun 2005 07:45:58 PM CST Install Date: Fri 06 Jul 2007

  Install Date: Fri 06 Jul 2007 03:30:09 PM CST Build Host: crowe.devel.redhat.com

  Group : System Environment/Base Source RPM: coreutils-5.2.1-31.2.src.rpm

  Size : 7636028 License: GPL

  Signature : DSA/SHA1, Thu 14 Jul 2005 02:52:44 AM CST, Key ID 219180cddb42a60e

  Packager : Red Hat, Inc.

  URL : ftp://alpha.gnu.org/gnu/coreutils/

  Summary : The GNU core utilities: a set of tools commonly used in shell scripts

  Description :

  These are the GNU core utilities. This package is the combination of

  the old GNU fileutils, sh-utils, and textutils packages.

  $ man seq

  SEQ(1) User Commands

  NAME

  seq - print a sequence of numbers

  SYNOPSIS

  seq [OPTION]... LAST

  seq [OPTION]... FIRST LAST

  seq [OPTION]... FIRST INCREMENT LAST

  DESCRIPTION

  Print numbers from FIRST to LAST, in steps of INCREMENT.

  -f, --format=FORMAT

  use printf style. floating-point FORMAT (default: %g)

  -s, --separator=STRING

  use STRING to separate numbers (default: \n)

  -w, --equal-width

  equalize width by padding with leading zeroes

  --help display this help and exit

  --version

  output version information and exit

  If FIRST or INCREMENT is omitted, it defaults to 1. That is, an omitted INCREMENT defaults to 1 even when LAST

  is smaller than FIRST. FIRST, INCREMENT, and LAST are interpreted as floating point values. INCREMENT is usually

  positive if FIRST is smaller than LAST, and INCREMENT is usually negative if FIRST is greater than LAST. When given,

  the FORMAT argument must contain exactly one of the printf-style, floating point output formats %e, %f, %g

  $ cat conn.sql

  #! /bin/bash

  for ((i=1; i<=10; ++i))

  do

  sqlplus scott/xxxx @aa.sql &

  done

  --这样那个可以写成

  for i in $(seq 10); do

  sqlplus scott/xxxx @aa.sql &

  done
程序编辑:百利宫娱乐城
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP