![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Create individual tgz files from a set of files | amitg | UNIX for Dummies Questions & Answers | 4 | 04-29-2008 09:13 AM |
| compare files and create new with awk | tonet | Shell Programming and Scripting | 7 | 12-27-2007 10:05 AM |
| on how to create files | fiol73 | UNIX for Dummies Questions & Answers | 2 | 12-19-2006 07:41 AM |
| Creating create mirrored disk files systems using mkfs command | GLJ@USC | UNIX for Dummies Questions & Answers | 4 | 11-07-2006 01:52 PM |
| How to compare several files and create a new one | alxkn | UNIX for Dummies Questions & Answers | 1 | 07-17-2006 11:04 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Create files with one command
I whant a create some files in the certain range.
For example, begin 8811 and finishing 8878 I know one good decision Code:
touch 88{11,12,13,14,15,16,...,...,78}
Bash create file with name 88[11-78] ![]() But it very long command I wanna create it easy This is possible ? |
|
|||||
|
Quote:
it depends on your bash/ksh version: Code:
zsh 4.3.4% bash
bash 3.2.25(1)$ echo {1..3}
1 2 3
bash 3.2.25(1)$ ksh
$ print ${.sh.version}
Version M 1993-12-28 r
$ echo {1..3}
1 2 3
$ mksh
$ print $KSH_VERSION
@(#)MIRBSD KSH R29 2007/05/24
$ echo {1..3}
{1..3}
$ pdksh
$ echo {1..3}
{1..3}
Code:
zsh 4.3.4% print {a-c}
{a-c}
zsh 4.3.4% setopt braceccl
zsh 4.3.4% print {a-c}
a b c
zsh 4.3.4% bash
bash 3.2.25(1)$ echo {a..c}
a b c
bash 3.2.25(1)$ ksh
$ echo {a..c}
a b c
Code:
zsh 4.3.4% print {a--z}
. / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z
zsh 4.3.4% bash+william
bash 3.00.0(2)-bashdiff-1.44$ echo {a--z}
a b c d e f g h i j k l m n o p q r s t u v w x y z
Last edited by radoulov; 10-09-2007 at 02:39 PM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|