Sponsored Content
Full Discussion: Generating line number
Top Forums UNIX for Dummies Questions & Answers Generating line number Post 302213010 by Amey Joshi on Wednesday 9th of July 2008 03:13:52 AM
Old 07-09-2008
Hi,
My file is
DSLink43
DSLink46
DSLink48
DSLink46
DSLink46
DSLink44

My desired ouput is:
1.DSLink43
2.DSLink46
3.DSLink48
4.DSLink46
5.DSLink46
6.DSLink44

Thanks In Advance!Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Generating random number within a specific range (0.5-1.5)

Hello, need a way to generate numbers within 0.5-1.5 range Has to be totally random: 0.6 1.1 0.8 1.5 0.6 and so on.... How to? (10 Replies)
Discussion started by: TehOne
10 Replies

2. Programming

generating 16 digit random number in C

Hi, How can we generate 16 digit random nos in C. (10 Replies)
Discussion started by: ajaysahoo
10 Replies

3. Programming

C Help; generating a random number.

Im new to C, and Im having a hard time getting a random number. In bash, I would do something similar to the following to get a random number; #!/bin/bash seed1=$RANDOM seed2=$RANDOM seed3=$RANDOM SEED=`expr $seed1 * $seed2 / $seed3` echo ${SEED%.*} Now, in online examples... (4 Replies)
Discussion started by: trey85stang
4 Replies

4. UNIX for Dummies Questions & Answers

How to read contents of a file from a given line number upto line number again specified by user

Hello Everyone. I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below: if ; then if ; then tail +$1 $3 | head -n $2 else ... (5 Replies)
Discussion started by: grc
5 Replies

5. Programming

Generating Random Number in Child Process using Fork

Hello All, I am stuck up in a program where the rand functions ends up giving all the same integers. Tried sleep, but the numbers turned out to be same... Can anyone help me out how to fix this issue ? I have called the srand once in the program, but I feel like when I call fork the child process... (5 Replies)
Discussion started by: manisum
5 Replies

6. Shell Programming and Scripting

Help with ahem Prime number Generating Script

Can anybody tell me why the second part of this script (Sieve of Eratosthenes) isn't working properly. This isnt coursework or homework just private studies ( Yes Project Euler began it ) I know there are easier ways of doing this too but I want to do it this way.:p Iam using Cygwin on Vista... (3 Replies)
Discussion started by: drewann
3 Replies

7. Shell Programming and Scripting

Generating graphs for many number of files

Hi, I have a series of data files for which I wish to plot using "splot". Say, the files names are like: 950_data,951_data,952_data,......1000_data. For one file , say to plot 950_data, i write following lines into a single file and load it in the gnuplot as : gnuplot> load 'plot' ... (6 Replies)
Discussion started by: begin_shell
6 Replies

8. Shell Programming and Scripting

Generating Random Number in certain range

Hi there I am trying to generate a random number between 40 and 70 using the shell here is my code so far and it keeps going above 70. all help much appreciated! comp=$(( RANDOM%70+40 )) echo $comp (4 Replies)
Discussion started by: faintingquiche
4 Replies

9. Shell Programming and Scripting

Random number generating script?

Having a hard time with this. Very new to scripting and linux. Spent all sunday trying to do this. Appreciate some help and maybe help breaking down what the syntax does. Create a Bash program. It should have the following properties • Creates a secret number between 1 and 100 i. The... (3 Replies)
Discussion started by: LINUXnoob15
3 Replies

10. Shell Programming and Scripting

Generating a POSIX random number?

Hi Guys and gals... As you know I am getting to grips with POSIX and hit this stumbling block. Generating two random numbers 0 to 255 POSIXly. Speed in not important hence the 'sleep 1' command. I have done a demo that works, but it sure is ugly! Is there a better way? #!/bin/sh # Random... (12 Replies)
Discussion started by: wisecracker
12 Replies
QRSTAT(1)						   Sun Grid Engine User Commands						 QRSTAT(1)

NAME
qrstat - show the status of Sun Grid Engine Advance Reservations (AR) SYNTAX
qrstat [-ar ar_id,...] [-help] [-u user,...] [-explain] DESCRIPTION
qrstat shows the current status of the available Sun Grid Engine ARs. The selection option -ar allows you to get information about spe- cific AR. The administrator and the user may define files which can contain any of the options described below. A cluster-wide sge_qrstat file may be placed under $SGE_ROOT/$SGE_CELL/common/sge_qrstat The user private file is searched at the location $HOME/.sge_qrstat. The home direc- tory request file has the highest precedence over the cluster global file. Command line can be used to override the flags contained in the files. OPTIONS
-ar ar_id,... Prints various information about the ARs identified by given ar_id list. -explain Displays the reason for the error state of an AR. Possible reasons are the unknown state of a host or queue instance. The output format for the alarm reasons is one line per reason. -help Prints a listing of all options. -u user,... Display information only for those ARs created by the users from the given user list. The string $user is a placeholder for the current username. An asterisk "*" can be used as username wildcard to request that all users' ARs be displayed. The default value for this switch is "-u $user". -xml This option can be used with all other options and changes the output to XML. The used schemas are referenced in the XML output. The output is printed to stdout. OUTPUT FORMATS
Depending on the presence or absence of the -ar option there are two output formats need to be differentiated. Advance Reservation Summary (without -ar) Following the header line, a section for each AR is provided. The columns contain information for o the AR id. o the name of the AR. o the current state of the AR. One of following states 'wWrEd". w - waiting without error W - warning (effective - waiting with error) r - running E - error (effective - running with error) d - deleted o the start time of the AR. o the end time of the AR. o the duration of the AR. Detailed Format (with -ar) The output contains two columns. The first one contains all AR attributes. The second one the corresponding value. ENVIRONMENTAL VARIABLES
SGE_ROOT Specifies the location of the Sun Grid Engine standard configuration files. SGE_CELL If set, specifies the default Sun Grid Engine cell. To address a Sun Grid Engine cell qrstat uses (in the order of prece- dence): The name of the cell specified in the environment variable SGE_CELL, if it is set. The name of the default cell, i.e. default. SGE_DEBUG_LEVEL If set, specifies that debug information should be written to stderr. In addition the level of detail in which debug infor- mation is generated is defined. SGE_QMASTER_PORT If set, specifies the tcp port on which sge_qmaster(8) is expected to listen for communication requests. Most installations will use a services map entry for the service "sge_qmaster" instead to define that port. FILES
<sge_root>/<cell>/common/act_qmaster Sun Grid Engine master host file <sge_root>/<cell>/common/sge_qrstat cluster qrstat default options $HOME/.sge_qrstat user qrstat default options SEE ALSO
sge_intro(1), qrsub(1), qrdel(1), qsub(1), COPYRIGHT
See sge_intro(1) for a full statement of rights and permissions. SGE 6.2u5 $Date$ QRSTAT(1)
All times are GMT -4. The time now is 03:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy