nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

how to create multiple file in a single command

This is a discussion on how to create multiple file in a single command within the Shell scripting forums, part of the Development/Scripting category; hi, i want to create in the extension of ".txt" IS there any command available for careating the ten file ...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 07-25-2006, 01:21 PM
Junior Member
 
Join Date: Jul 2006
Posts: 3
Rep Power: 0
selvam
Default how to create multiple file in a single command

hi,

i want to create in the extension of ".txt"

IS there any command available
for careating the ten file in the name of

a1.txt , a2.txt, a3.txt .... a10.txt

if u know the command help to me

thanks
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-25-2006, 01:35 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,036
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Use touch or other command as follows
Code:
touch a{1,2,3,4,5,6,7,8,9,10}.txt
there are other ways too but this is easy for 10 files
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
  #3 (permalink)  
Old 07-25-2006, 02:10 PM
Junior Member
 
Join Date: Jul 2006
Posts: 3
Rep Power: 0
selvam
Default thanks with a query

hi

ur command is working

thanks

could u tell me more about xargs,awk in shell script
Reply With Quote
  #4 (permalink)  
Old 07-26-2006, 02:01 AM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
My distro: Ubuntu
Posts: 1,036
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Quote:
could u tell me more about xargs,awk in shell script
awk is small programming language pattern scanning and processing with C like syntax. It is quite useful for processing text-based data. Please note that limitations of AWK programs (and sed script lead into development of perl.

xargs build and execute command lines from standard input or shell pipes. For example find all *.tmp file and remove them:

Code:
find . -name "*.tmp" | xargs rm
if you have specific question(, please start a new topic.
__________________
Vivek | My personal blog
Linux Evangelist
Play hard stay cool
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
How to create multiple user account? droidwork Shell scripting 11 02-23-2008 02:35 PM
single DHCP server with multiple VLAN's frank Computer Networking and Internet/broadband 2 12-07-2007 01:38 PM
Create new user account in Ubuntu Linux from command line sweta Getting started tutorials 0 06-21-2007 02:49 AM
Lighttpd socket with multiple subdomains or single IP muks Web servers 2 03-17-2007 05:48 AM
HP UX create or add users from command line using useradd rockdalinux HP-UX 0 12-20-2006 03:13 PM


All times are GMT +5.5. The time now is 05:46 PM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36