Sponsored Content
Full Discussion: specifing range....
Top Forums UNIX for Advanced & Expert Users specifing range.... Post 302141491 by radoulov on Friday 19th of October 2007 09:07:31 AM
Old 10-19-2007
Quote:
Originally Posted by zedex
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;

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Getting 'out of range' when partitioning

Hello, Using Solaris 10. Going to mirror disks with solstice disksuite. Documentation says I have to make both disks partitioned exactly the same before moving on. Here's the layout of c1t0d0 Part Tag Flag Cylinders Size Blocks 0 root wm 1237 - 2473 6.00GB (1237/0/0) 12587712 ... (1 Reply)
Discussion started by: pmichner
1 Replies

2. Shell Programming and Scripting

A range problem

I have a text file which contains a row of values ranging from -9.99 to 1.00 now the issue here is I need the script below to keep checking recursively th entire file, yes the entire fila and only then specify the row contains just 1.00 or any other value... the script is below ... (0 Replies)
Discussion started by: deaddevil
0 Replies

3. Shell Programming and Scripting

print range between two patterns if it contains a pattern within the range

I want to print between the range two patterns if a particular pattern is present in between the two patterns. I am new to Unix. Any help would be greatly appreciated. e.g. Pattern1 Bombay Calcutta Delhi Pattern2 Pattern1 Patna Madras Gwalior Delhi Pattern2 Pattern1... (2 Replies)
Discussion started by: joyan321
2 Replies

4. Shell Programming and Scripting

Day '29' out of range 1..28 at

Hi all, I wrote few lines of code to check how long a process has been uptime. I work on Solaris SunOS 5.10 and perl v5.8.4. Here is the code: #!/usr/bin/perl use Time::Local; $service="TCPIPSCH"; $PID_SERVICE=`ps -ef | grep -w $service | grep -v grep | awk '{print \$2}'`; if... (2 Replies)
Discussion started by: Evan
2 Replies

5. UNIX Desktop Questions & Answers

date range

I have a number of instances wher I need to run reports for the previous month and need to include the last months date range in the sql. I want to create a string which consists of the first and last dates of last month separated with an ' and ' ie for this month (Feb) I want it to say '01/01/10... (3 Replies)
Discussion started by: Niven
3 Replies

6. Shell Programming and Scripting

range in if using awk

Hi All, I would like to assign the following values to each column in my file. if $i is between 1 and -1 (ie -1 < $i < 1) then print A; if $i is between -2 and -1 && 1 and 2 (ie. -2 < $i < -1 && 1 < $i < 2) then print B; if $i is between -3 and -2 && 2 and 3 (ie. -3 < $i < -2 && 2 < $i < 3)... (1 Reply)
Discussion started by: Fredrick
1 Replies

7. UNIX for Dummies Questions & Answers

Classify value to a range

Dear All, I need to classify my data into sets or ranges based on values in the second column of a file as - low medium and high. INPUT: file1.dat 1.tmp 1.03 2.tmp 0.38 3.tmp 3.23 4.tmp 1.34 I would like to classify all the numerical values into a range based on the followng... (3 Replies)
Discussion started by: chen.xiao.po
3 Replies

8. Shell Programming and Scripting

Range of number from 0.1 to 10.0

Is there a way to create a loop that will output number starting from 0.1 to 10.0 0.1 0.2 0.3 0.4 0.5 .. ... 10.0 This is what i tried. for i in {1..50}; do printf -v i '%02d' $i ; echo "$i"; done That will print 01 02 03 .. .. 50 (9 Replies)
Discussion started by: vietrice
9 Replies

9. IP Networking

IP Range Assigning

Hi All, I'm a bit confused about assigning IP address from IP Ranges. I am using this scenario below to understand. Scenario Adatum.com an international IT solutions company, is launching 12 new branches in a new country where they currently have no existing branches. The sWin CIO has asked... (3 Replies)
Discussion started by: TryllZ
3 Replies

10. Homework & Coursework Questions

IP Range Assigning

THIS IS A SAMPLE PRACTICAL EXAM QUESTION, COMPLETE FILE HAS BEEN ATTACHED AS WELL. Hi All, I'm a bit confused about assigning IP address from IP Ranges. I am using this scenario below to understand. Scenario Adatum.com an international IT solutions company, is launching 12 new branches in a... (10 Replies)
Discussion started by: TryllZ
10 Replies
nissetup(1M)						  System Administration Commands					      nissetup(1M)

NAME
nissetup - initialize a NIS+ domain SYNOPSIS
/usr/lib/nis/nissetup [-Y] [domain] DESCRIPTION
nissetup is a shell script that sets up a NIS+ domain to service clients that wish to store system administration information in a domain named domain. This domain should already exist prior to executing this command. See nismkdir(1) and nisinit(1M). A NIS+ domain consists of a NIS+ directory and its subdirectories: org_dir and groups_dir. org_dir stores system administration informa- tion and groups_dir stores information for group access control. nissetup creates the subdirectories org_dir and groups_dir in domain. Both subdirectories will be replicated on the same servers as the parent domain. After the subdirectories are created, nissetup creates the default tables that NIS+ serves. These are auto_master, auto_home, bootparams, cred, ethers, group, hosts, mail_aliases, netmasks, networks, passwd, protocols, rpc, services, and timezone. The nissetup script uses the nistbladm(1) command to create these tables. The script can be easily customized to add site specific tables that are created at setup time. This command is normally executed just once per domain. While this command creates the default tables, it does not initialize them with data. This is accomplished with the nisaddent(1M) command. It is easier to use the nisserver(1M) script to create subdirectories and the default tables. OPTIONS
-Y Specify that the domain will be served as both a NIS+ domain as well as an NIS domain using the backward compatibility flag. This will set up the domain to be less secure by making all the system tables readable by unauthenticated clients as well. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWnisu | +-----------------------------+-----------------------------+ SEE ALSO
nis+(1), nismkdir(1), nistbladm(1), nisaddent(1M), nisinit(1M) nisserver(1M), attributes(5) NOTES
NIS+ might not be supported in future releases of the SolarisTM Operating Environment. Tools to aid the migration from NIS+ to LDAP are available in the Solaris 9 operating environment. For more information, visit http://www.sun.com/directory/nisplus/transition.html. SunOS 5.10 13 Dec 2001 nissetup(1M)
All times are GMT -4. The time now is 05:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy