i have this text file name test.txt which contain :
aaaaa bbb
iiiiiiiiiiiii ccf
ddaaa ddd
and i need a script that can print out the line numbers using a while loop..
so when the script is run..it will have this:
1
2
3
any ideas? :) thanks guys (4 Replies)
Hi one and all,
I'm working on a Bash script that is designed to calculate how much IP traffic has passed through a port to determine traffic volume over a given amount of time.
I've currently been able to use the netstat -s command coupled with grep to write to a file the total packets... (13 Replies)
I have a text file in the following format
....
START
1,1
2,1
3,1
..
..
9,1
10,1
END
....
I want to change to the output to
....
START
1,1
2,1
3,1
.. (4 Replies)
Just wondering if someone could assist me with shell script I'm trying to write. I need to read the final column of a text file (shown below) and workout what the average number is. The text file will have a variable number of lines, I just want the script to pull out the values in the final field... (14 Replies)
Hi
I have a text file with rows like this:
7 Herman ASI-40 Jungle (L) Blueprint (L) Weapon Herman ASI-40 Jungle (L) 215.00 57 65.21 114.41
and
9 Herman CAP-505 (L) Blueprint (L) Weapon Herman CAP-505 (L) 220.00 46.84 49.1 104.82
and
2 ClericDagger 1C blueprint Melee - Shortblade... (2 Replies)
Hi,
I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
Hi,
I would like to add a new column containing the row numbers to a text file. How do I go about doing that? Thanks!
Example input:
A X
B Y
C D
Output:
A X 1
B Y 2
C D 3 (5 Replies)
Hi,
I need to number the lines in my text file. I know how to do this with standard numbering (1,2,3,4, etc) but I need to count in multiples of 5, beginning 0,5,10,15...
example existing file:
abcd
efg
hijklm
nopqrs
desired output
0 abcd
5 efg
10 hijklm
15 ... (11 Replies)
Discussion started by: livbaddeley
11 Replies
LEARN ABOUT LINUX
niserror
niserror(1) User Commands niserror(1)NAME
niserror - display NIS+ error messages
SYNOPSIS
niserror error-num
DESCRIPTION
niserror prints the NIS+ error associated with status value error-num on the standard output. It is used by shell scripts to translate
NIS+ error numbers that are returned into text messages.
EXAMPLES
Example 1: Using niserror
The following example prints the error associated with the error number 20:
example% niserror 20
Not Found, no such name
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWnisu |
+-----------------------------+-----------------------------+
SEE ALSO nis+(1), nis_error(3NSL), attributes(5)NOTES
NIS+ might not be supported in future releases of the SolarisTM Operating Environment. Tools to aid the migration from NIS+ to LDAP are
available in the Solaris 9 operating environment. For more information, visit http://www.sun.com/directory/nisplus/transition.html.
SunOS 5.10 10 Dec 2001 niserror(1)