Sponsored Content
Full Discussion: How print number
Top Forums Shell Programming and Scripting How print number Post 302189876 by jim mcnamara on Monday 28th of April 2008 05:53:33 AM
Old 04-28-2008
One way:
Code:
ls | nl

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

to print number one less than actual number

suppose we have a file which contains 34 45 56 77 55 66 54 67 so output shud be like 33 44 55 76 54 65 53 66 (4 Replies)
Discussion started by: cdfd123
4 Replies

2. UNIX for Dummies Questions & Answers

print duplicate number

input chr1 10 100 chr1 10 100 chr1 20 200 output chr1 10 100 2 chr1 20 200 1 (1 Reply)
Discussion started by: repinementer
1 Replies

3. UNIX for Dummies Questions & Answers

How to print number before argument?

Hey everyone, I need to write a script that will display the number of the argument before displaying the argument itself. Here's what I have so far: for arg in "$@" do echo $#:$arg done This returns the sum of all arguments preceding the arguments themselves. $(script) a b c 3:a... (1 Reply)
Discussion started by: unclepickle1
1 Replies

4. Shell Programming and Scripting

Print line number

how i need help again i have file input.txt like this 48:20111008_20111122:31231|123| 78:20111008_20111122:435453|321112| where 48 and 78 is line number 20111008_20111122 is a file and 31231|123| i want get in file, i am using manual awk for get that file like this awk 'NR==48... (6 Replies)
Discussion started by: zvtral
6 Replies

5. Shell Programming and Scripting

Perl : print the sequence number without missing number

Dear Perl users, I need your help to solve my problem below. I want to print the sequence number without missing number within the range. E.g. my sequence number : 1 2 3 4 5 6 7 8 11 12 13 14 my desired output: 1 -8 , 11-14 my code below but still problem with the result: 1 - 14 1 -... (2 Replies)
Discussion started by: mandai
2 Replies

6. Shell Programming and Scripting

AWK print number of records, divide this number

I would like to print the number of records of 2 files, and divide the two numbers awk '{print NR}' file1 > output1 awk '{print NR}' file2 > output2 paste output1 output2 > output awl '{print $1/$2}' output > output_2 is there a faster way? (8 Replies)
Discussion started by: programmerc
8 Replies

7. Shell Programming and Scripting

Print only word not number

Hi, Need to extract only words not numbers #cat test.txt 123456 oracle web 56789 s21adm Required output #grep <options> test.txt oracle web s21adm Note, in between integer "s21adm" is required but not with full integer "123456" and "56789" (6 Replies)
Discussion started by: ksgnathan
6 Replies

8. Shell Programming and Scripting

awk to find number in a field then print the line and the number

Hi I want to use awk to match where field 3 contains a number within string - then print the line and just the number as a new field. The source file is pipe delimited and looks something like 1|net|ABC Letr1|1530||| 1|net|EXP_1040 ABC|1121||| 1|net|EXP_TG1224|1122||| 1|net|R_North|1123|||... (5 Replies)
Discussion started by: Mudshark
5 Replies

9. Shell Programming and Scripting

Print occurence number

Hi folks, I have a file with lots of lines in a text file,i need to print the occurence number after sorting based on the first column as shown below, thanks in advance. sam,dallas,20174 sam,houston,20175 sam,atlanta,20176 jack,raleigh,457865 jack,dc,7845 john,sacramento,4567 ... (4 Replies)
Discussion started by: tech_frk
4 Replies

10. UNIX for Beginners Questions & Answers

Print number of lines for files in directory, also print number of unique lines

I have a directory of files, I can show the number of lines in each file and order them from lowest to highest with: wc -l *|sort 15263 Image.txt 16401 reference.txt 40459 richtexteditor.txt How can I also print the number of unique lines in each file? 15263 1401 Image.txt 16401... (15 Replies)
Discussion started by: spacegoose
15 Replies
UPRECORDS(1)						      General Commands Manual						      UPRECORDS(1)

NAME
uprecords - provides uptime records SYNOPSIS
uprecords [ -?abBcfkKMsv ] [ -i <interval> ] [ -m <count> ] DESCRIPTION
This manual page documents the uprecords program. uprecords is a program that provides record statistics from the uptimed(8) program. OPTIONS
-? Show usage -a Do not print ANSI codes -b -B Sort by time of bootup, oldest entry first. -B reverses. Option implies -s. Do not print ANSI codes -c Do not show current entry if not in top entries -f Run continuously in a loop -k -K Sort by kernel/system name. -K reverses. Option implies -s. -M Show next milestone -s Do not print extra statistics -i <interval> Use <interval> seconds for loop instead of 5, implies -f -m <count> Show a maximum of top COUNT entries instead of 10 -v Show version information SEE ALSO
uptimed(8) AUTHOR
Rob Kaper <cap@capsi.com>. This manual page was written by Alan Ford <alan@whirlnet.co.uk>, for the Debian GNU/Linux system (but may be used by others). It was last modified for uptimed version 0.3.7. June 20, 2004 UPRECORDS(1)
All times are GMT -4. The time now is 11:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy