Sponsored Content
Full Discussion: Generating line number
Top Forums UNIX for Dummies Questions & Answers Generating line number Post 302213019 by Amey Joshi on Wednesday 9th of July 2008 03:34:56 AM
Old 07-09-2008
Quote:
Originally Posted by nua7
Code:
cat -n file-name > new_file

Thanks!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
prepmx(1)							prepmx Manual Page							 prepmx(1)

NAME
prepmx - preprocessor for PMX, easy music typesetting program SYNOPSIS
prepmx [options] jobname [outdir/] [stylefile] DESCRIPTION
M-Tx is an easy to use preprocessor language for the PMX music typesetting program, aimed at people who are not experts. For an easy exam- ple, have a look at the following example: c2+ e4 g | b4d- c1 d c2 | c8 g+ e g c- g+ e g | d g f g c- g+ e g | For syntax reference, please look at the M-Tx manual written by Dirk Laurie, the creator of the M-Tx language and the author of prepmx, its command line utility. prepmx processes the file jobname.mtx to generate jobname.pmx. You can then process this file using the `pmx' command. PMX is a pre- processor for MusiXTeX. outdir/ is the directory where `pmx' will put the final .tex file. Note that the trailing slash is mandatory. You can provide a stylefile for M-Tx. If omitted, the file `mtxstyle.txt' in the current directory is used, if there is one. OPTIONS
Options can also be specified in a `Options:' line in the preamble, which takes precedence over the command line. -b never unbeam eighth notes and shorter -c main music lines only - ignore chords -D enable debug mode -f use tonic sol-fa note names -i ignore errors -m music only - ignore lyrics -n indent first system and print default instrument names -t ignore uptext lines -u uptext synchronizes with notes only, not rests -v verbose progress report -w enable pedantic warnings -n select specified case of multiple score EXIT STATUS
If no error was found, prepmx exits with return code 0. In case of an error, the line number of the processed line is returned. This may not always be the line containing the actual error. A return status of 10000 means that the input file was empty or could not be opened. SEE ALSO
M-Tx User's Guide (/usr/share/doc/m-tx/mtxdoc.pdf.gz on a Debian system) pmx(1), musixtex(1) AUTHORS
prepmx was written by Dirk Laurie <dlaurie@na-net.ornl.gov>. This manual page was written by Roland Stigge <stigge@antcom.de> for the Debian project. It was revised and extended by Nis Martensen <nis.martensen@web.de>, mostly by copying text from Dirk Laurie's M-Tx User's Guide. M-Tx Version 0.60 01 September 2005 prepmx(1)
All times are GMT -4. The time now is 08:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy