Sponsored Content
Full Discussion: Numbering lines in a file
Special Forums Windows & DOS: Issues & Discussions Numbering lines in a file Post 30267 by minazk on Friday 18th of October 2002 05:59:13 PM
Old 10-18-2002
Numbering lines in a file

Hi all,

I need to number the lines in a file.
I tried using "set nu" in the vi editor, but it is only temporary.
Can anyone help me please.

Thanx in advance.

MK
minazk
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Numbering lines in a file

Hi all, I need to number the lines in a file. I tried using "set nu" in the vi editor, but it is only temporary. Can anyone help me please. Thanx in advance. MK (4 Replies)
Discussion started by: minazk
4 Replies

2. Shell Programming and Scripting

Numbering Lines

Hello everyone, I want get numbered lines from a file. and i can do it with: sed = file.txt | sed "/./N; s/\n/ /" | sed -n "5,7p" but the output that i get is something similar to: 5 line5 6 line6 7 line7 and i want something like this (with 2points after the number): 5:... (6 Replies)
Discussion started by: vibra
6 Replies

3. UNIX for Dummies Questions & Answers

Numbering lines grep

Is there a way to number lines and use something other than ":" to separate the number from the line? Or can anyone recommend a way to replace the ":" with a tab? Here's what I'm working with: 16859:52.67 16860:46 16861:39.63 16862:33.88 16863:29.64 16864:26.27 16865:22.09... (1 Reply)
Discussion started by: jdolny
1 Replies

4. Shell Programming and Scripting

Numbering a Text File

Running into a little problem with blank lines. My file is of this format: To number each line of the file i would use: n=1 echo "$FILE" | while read line do echo "$n) $line" n=`expr $n + 1` But really, i dont want to number the blank lines. What i've tried is to use sed... (13 Replies)
Discussion started by: omgsomuchppl
13 Replies

5. Shell Programming and Scripting

numbering lines according to a condition

hello again guys, I tried to make a script but due to array's limitations I didn't succeed...so I'm asking you :) I need numbering the lines according to date (everyday I need to restart the counter) for example: ABCBD 20080101 XXX 1 FSDFD 20080101 BBB 2 FSDFD 20080102 HHH 1 and so... (3 Replies)
Discussion started by: elionba82
3 Replies

6. Shell Programming and Scripting

numbering each line in a text file

I have a simple text file. I want to number each line in that file . for example: My text file is unix my file test My output should be 1 unix 2 my file 3 test (5 Replies)
Discussion started by: pitagi
5 Replies

7. UNIX for Dummies Questions & Answers

Ghostscript output file numbering?

I am using ghostscript to convert a multi-page pdf file to individual jpg files. I am wondering if there is a way to get ghostscript to start numbering the output jpg files from zero? What i am trying to convey is that it starts naming my files from page_001.jpg, page_002.jpg, etc., and would like... (0 Replies)
Discussion started by: RacerX
0 Replies

8. Shell Programming and Scripting

help with numbering a file

Hi, All I need to do is number a file. The file looks like this > JJJJJJJJJJJJJJJJJJJJJ > JKJKJKKKKKKJJJ > MMMMYKKKJKKK what I want to do is number it so that theres a numerical value beside the >. >1 JJJJJJJJJJJJJJJJJJJJJ >2 JKJKJKKKKKKJJJ (2 Replies)
Discussion started by: kylle345
2 Replies

9. Shell Programming and Scripting

Numbering file's lines

hey a file called test : Code: hey1 hey2 hey3 ........ how to : Code: 1.hey1 2.hey2 3.hey3 .......... (3 Replies)
Discussion started by: eawedat
3 Replies

10. UNIX for Dummies Questions & Answers

numbering lines in a file

if we execute :set nu in vi mode, it displays the line numbers. so how to make this permanently in a file. Whenever i execute cat , the line numbers should be there. please help me. thanks (4 Replies)
Discussion started by: pandeesh
4 Replies
edquota(1M)						  System Administration Commands					       edquota(1M)

NAME
edquota - edit user quotas for ufs file system SYNOPSIS
edquota [-p proto_user] username... edquota -t DESCRIPTION
edquota is a quota editor. One or more users may be specified on the command line. For each user a temporary file is created with an ASCII representation of the current disk quotas for that user for each mounted ufs file system that has a quotas file, and an editor is then invoked on the file. The quotas may then be modified, new quotas added, etc. Upon leaving the editor, edquota reads the temporary file and modifies the binary quota files to reflect the changes made. The editor invoked is vi(1) unless the EDITOR environment variable specifies otherwise. Only the super-user may edit quotas. In order for quotas to be established on a file system, the root directory of the file system must contain a file, owned by root, called quotas. (See quotaon(1M).) proto_user and username can be numeric, corresponding to the UID of a user. Unassigned UIDs may be specified; unassigned names may not. In this way, default quotas can be established for users who are later assigned a UID. If no options are specified, the temporary file created will have one or more lines of the format, where a block is considered to be a 1024 byte(1K) block: fs mount_point blocks (soft =number, hard =number ) inodes (soft =number, hard =number) The number fields may be modified to reflect desired values. OPTIONS
The following options are supported: -p Duplicate the quotas of the proto_user specified for each username specified. This is the normal mechanism used to initialize quo- tas for groups of users. -t Edit the soft time limits for each file system. If the time limits are zero, the default time limits in /usr/include/sys/fs/ufs_quota.h are used. The temporary file created will have one or more lines of the form fs mount_point blocks time limit = number tmunit, files time limit = number tmunit tmunit may be one of ``month'', ``week'', ``day'', ``hour'', ``min'' or ``sec''; characters appended to these keywords are ignored, so you may write ``months'' or ``minutes'' if you prefer. The number and tmunit fields may be modified to set desired values. Time limits are printed in the greatest possible time unit such that the value is greater than or equal to one. If ``default'' is printed after the tmunit, this indicates that the value shown is zero (the default). USAGE
See largefile(5) for the description of the behavior of edquota when encountering files greater than or equal to 2 Gbyte ( 2**31 bytes). FILES
quotas quota file at the file system root /etc/mnttab table of mounted file systems ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
vi(1), quota(1M), quotacheck(1M), quotaon(1M), repquota(1M), attributes(5), largefile(5), quotactl(7I) NOTES
All UIDs can be assigned quotas. SunOS 5.10 14 Feb 2003 edquota(1M)
All times are GMT -4. The time now is 10:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy