Sponsored Content
Full Discussion: Display Line numbers
Top Forums Shell Programming and Scripting Display Line numbers Post 302273637 by ma466 on Monday 5th of January 2009 11:14:05 AM
Old 01-05-2009
Thanks.
 

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

display lines b/w given line numbers

write a shell script that accepts a file name starting and ending line numbers as arguments and displays all the lines between the given line numbers:b:.help is appreciated.thank you. (3 Replies)
Discussion started by: shawz
3 Replies

3. Shell Programming and Scripting

Display mutiple line in single line

Hi All, I had a file called Input.txt, i need to group up in a single line as 1=ttt and the no of lines may vary bewteen the 1=ttt cat Input.txt 1=ttt,2=xxxxxx, 3=4545 44545, 4=66667 7777, 5=77723 1=ttt, 2=xxxxxx, 3=34436 66 3545, 4=66666, 5=ffffff, 6=uuuuuuu 1=ttt, 2=xxxxxx,... (4 Replies)
Discussion started by: manosubsulo
4 Replies

4. Shell Programming and Scripting

Removing Line numbers

Hi all, I have a file consisting of lines in such a format: separated by space and M1 EOS for fullstop (.) ] e.g M1 I M1 have M1 a M1 file M1 consisting M1 of M1 lines M1 in M1 such M1 a M1 format M1 EOS M2 This M2 is M3 an (4 Replies)
Discussion started by: my_Perl
4 Replies

5. 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

6. UNIX for Dummies Questions & Answers

grep to get line numbers

I know if i use grep -n that the output will have the lines numbered but is there a way to grep the actually line number. so like this grep -n "one" /usr/dict/numbers 1:one 21:twenty-one 31:thirty-one 41:forty-one 51:fifty-one 61:sixty-one 71:seventy-one 81:eighty-one 91:ninety-one ... (1 Reply)
Discussion started by: alindner
1 Replies

7. 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

8. Shell Programming and Scripting

using sed command to display contents where line numbers are stored in variables

if i want to display the contents of a file between say line number 3 and 10 then i use the following command sed -n '3,10p' filename if this 3 was contained in x and 10 was contained in y then how wud this command modified? sed -n '$x,$yp' filename does not work..please advise (2 Replies)
Discussion started by: arindamlive
2 Replies

9. UNIX for Dummies Questions & Answers

To find and display the middle line in a file using single line command.

Hi all, How can i display the middle line of a file using a single line command? (6 Replies)
Discussion started by: Lakme Pemmaiah
6 Replies

10. UNIX for Dummies Questions & Answers

VI editior line numbers

Hello All, I am very sure this a dumb question to many, but from my view its worth asking. When I do a vi on a file, on the right bottom side I am seeing something like below: 27,16-24 7% which tells me that I am on line 27 (which is the first number before the comma, i would like... (11 Replies)
Discussion started by: babyPen1985
11 Replies
ATF-SH(1)						    BSD General Commands Manual 						 ATF-SH(1)

NAME
atf-sh [-s shell] -- interpreter for shell-based test programs SYNOPSIS
atf-sh script DESCRIPTION
atf-sh is an interpreter that runs the test program given in script after loading the atf-sh(3) library. atf-sh is not a real interpreter though: it is just a wrapper around the system-wide shell defined by ATF_SHELL. atf-sh executes the inter- preter, loads the atf-sh(3) library and then runs the script. You must consider atf-sh to be a POSIX shell by default and thus should not use any non-standard extensions. The following options are available: -s shell Specifies the shell to use instead of the value provided by ATF_SHELL. ENVIRONMENT
ATF_LIBEXECDIR Overrides the builtin directory where atf-sh is located. Should not be overridden other than for testing purposes. ATF_PKGDATADIR Overrides the builtin directory where libatf-sh.subr is located. Should not be overridden other than for testing purposes. ATF_SHELL Path to the system shell to be used in the generated scripts. Scripts must not rely on this variable being set to select a specific interpreter. EXAMPLES
Scripts using atf-sh(3) should start with: #! /usr/bin/env atf-sh Alternatively, if you want to explicitly choose a shell interpreter, you cannot rely on env(1) to find atf-sh. Instead, you have to hardcode the path to atf-sh in the script and then use the -s option afterwards as a single parameter: #! /path/to/bin/atf-sh -s/bin/bash ENVIRONMENT
ATF_SHELL Path to the system shell to be used in the generated scripts. SEE ALSO
atf-sh(3) BSD
September 27, 2014 BSD
All times are GMT -4. The time now is 10:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy