Sponsored Content
Full Discussion: generating line numbers
Top Forums Shell Programming and Scripting generating line numbers Post 302190107 by era on Monday 28th of April 2008 04:45:22 PM
Old 04-28-2008
The "Similar Threads" at the bottom of this page would be a good place to start. (Too bad the forums don't display that until you have posted your question.)
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Printing line numbers

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

2. Shell Programming and Scripting

generating random numbers with hamming distance 4

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

3. UNIX for Advanced & Expert Users

Add line numbers to end of each line

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

4. UNIX for Dummies Questions & Answers

Generating line number

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

5. Shell Programming and Scripting

Display Line numbers

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

6. Shell Programming and Scripting

Generating random numbers

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

7. Shell Programming and Scripting

More with line numbers

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

8. Shell Programming and Scripting

Generating Gaussian Distributed Random Numbers

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

9. Shell Programming and Scripting

Assign Line Numbers to each line of the file

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

10. Programming

generating pair of numbers in special order

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
INTRO(9)						   BSD Kernel Developer's Manual						  INTRO(9)

NAME
intro -- introduction to system kernel interfaces DESCRIPTION
This section contains information about the interfaces and subroutines in the kernel. PROTOTYPES ANSI-C AND ALL THAT Yes please. We would like all code to be fully prototyped. If your code compiles cleanly with cc -Wall we would feel happy about it. It is important to understand that this isn't a question of just shutting up cc, it is a question about avoiding the things it complains about. To put it bluntly, don't hide the problem by casting and other obfuscating practices, solve the problem. INDENTATION AND STYLE
Believe it or not, there actually exists a guide for indentation and style. It isn't generally applied though. We would appreciate if people would pay attention to it, and at least not violate it blatantly. We don't mind it too badly if you have your own style, but please make sure we can read it too. Please take time to read style(9) for more information. NAMING THINGS
Some general rules exist: 1. If a function is meant as a debugging aid in DDB, it should be enclosed in #ifdef DDB #endif /* DDB */ And the name of the procedure should start with the prefix DDB_ to clearly identify the procedure as a debugger routine. SCOPE OF SYMBOLS
It is important to carefully consider the scope of symbols in the kernel. The default is to make everything static, unless some reason requires the opposite. There are several reasons for this policy, the main one is that the kernel is one monolithic name-space, and pollution is not a good idea here either. For device drivers and other modules that don't add new internal interfaces to the kernel, the entire source should be in one file if possi- ble. That way all symbols can be made static. If for some reason a module is split over multiple source files, then try to split the module along some major fault-line and consider using the number of global symbols as your guide. The fewer the better. SEE ALSO
style(9) HISTORY
The intro section manual page appeared in FreeBSD 2.2. BSD
December 13, 1995 BSD
All times are GMT -4. The time now is 06:14 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy