The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Sed Range Issue Wrathe Shell Programming and Scripting 2 06-17-2008 03:54 PM
dhcpd - range parameter Keene44 IP Networking 1 03-27-2008 01:02 PM
Getting 'out of range' when partitioning pmichner UNIX for Dummies Questions & Answers 1 09-30-2006 01:51 AM
Look a string within a range! azmathshaikh Shell Programming and Scripting 0 05-01-2005 03:54 AM
Unix SCO 5.0.6 Out of range josramon UNIX for Dummies Questions & Answers 5 02-21-2003 02:06 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-19-2007
zedex zedex is offline
Registered User
  
 

Join Date: Feb 2007
Location: india,mumbai
Posts: 138
specifing range....

hi
i want to create file which will be executed in sqlplus
so consider there are abc[1-100] tables and i want count from all the tables now i used for loop for this for eg.
Code:
for name in dayj dptm tfj{1,2,3,4,5,6,7,8} tfx{1,2,3,4,5,6,7,8}
do
    echo "select count(*) from $name;" >> night_file.sql
done
but how can i specify only range like tfj[1-100] ??
  #2 (permalink)  
Old 10-19-2007
radoulov's Avatar
radoulov radoulov is offline Forum Staff  
addict
  
 

Join Date: Jan 2007
Location: Варна, България / Milano, Italia
Posts: 2,847
Quote:
Originally Posted by zedex View Post
hi
[..]
but how can i specify only range like tfj[1-100] ??
zsh, bash and ksh93 have brace expansion:

Code:
% printf "select count(1) from tfg%d;\n" {1..10}
select count(1) from tfg1;
select count(1) from tfg2;
select count(1) from tfg3;
select count(1) from tfg4;
select count(1) from tfg5;
select count(1) from tfg6;
select count(1) from tfg7;
select count(1) from tfg8;
select count(1) from tfg9;
select count(1) from tfg10;
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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




All times are GMT -4. The time now is 01:07 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0