10 More Discussions You Might Find Interesting
1. Programming
I need some help in generating pair of numbers in orders using FORTRAN code.
The order is like following.
loop_1: 1,2 2,3 3,4 4,5 5,6 6,7 7,8 ..... until <= 2000
loop_2: 1,3 3,5, 5,7 7,9 9,11 11,13 ........until <= 2000
loop_3: 1,4, 4,7 7,10 10,13 13,17 ..... until... (3 Replies)
Discussion started by: vjramana
3 Replies
2. Shell Programming and Scripting
Hi! I'm trying to assign line numbers to each line of the file
for example consider the following..
The contents of the input file are
hello how are you?
I'm fine.
How about you?
I'm trying to get the following output..
1 hello how are you?
2 I'm fine.
3 How about you? ... (8 Replies)
Discussion started by: abk07
8 Replies
3. Shell Programming and Scripting
I want to generate an awk function that generated a Gaussian distributed set of random numbers. I need to implement the thing below in awk. Rnd is just a uniform random number between 0 and 1
function rgaussian(r1, r2) {
Do
v1 = 2 * Rnd - 1
v2 = 2 * Rnd - 1
... (0 Replies)
Discussion started by: kristinu
0 Replies
4. Shell Programming and Scripting
Hi All,
How to get line numbers when we more on a file in LINUX
thanks
firestar (1 Reply)
Discussion started by: firestar
1 Replies
5. Shell Programming and Scripting
Hi,
I am having trouble with generating random numbers. can this be done with awk?
So I have a file that looks like this:
23 30
24 40
26 34
So column1 is start and column2 is end. I want to generate 3 random #'s between start and stop:
So the output will look like this:
... (9 Replies)
Discussion started by: phil_heath
9 Replies
6. Shell Programming and Scripting
Hi all experts,
I am getting error in my shell scripts and i want to find out which lines is in errors. How i can display the line numbers . Is it NU command? Please give me some suggestions. (4 Replies)
Discussion started by: ma466
4 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I am generating a file through some Datastage commands:
cat $TempDir/stage.txt |while read line
do
stagename=`echo $line`
dsjob -llinks $proj $jobname $stagename 2>/dev/null >> $TempDir/LinkName.txt
Now i have to assign the number... (5 Replies)
Discussion started by: Amey Joshi
5 Replies
8. UNIX for Advanced & Expert Users
Hi i would like to add line numbers to end of each line in a file.
I am able to do it in the front of each line using sed, but not able to add at the end of the file.
Can anyone suggest
The following code adds line number to start of each line
sed = filename | sed 'N;s/\n/\t/'
how can i... (5 Replies)
Discussion started by: rudoraj
5 Replies
9. Shell Programming and Scripting
Hi I want to genrate 10 random 32 bit binary numbers with hamming distance 4 and 8.
11010110010101010101010101010101
11010110010101010100010101010010
if we look carefully at these two binary numbers they differ at 4 places hence hamming distance 4. Now I want to genrate these numbers... (2 Replies)
Discussion started by: hack_tom
2 Replies
10. UNIX for Dummies Questions & Answers
Maybe this question is out there, but I searched and didnt see it.
To print my files I use
more filename | lpr -Pprinter
I would like to print my scripts with line numbers.
How do I do this? (2 Replies)
Discussion started by: MizzGail
2 Replies