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 dudes, I nee you kind assistance, I have to find the matched numbers from 2 text files and output of matched numbers should be in another text file..
I do have text files like this , for example
File 1
787
665*5-p
5454
545-p
445-p
5454*-p
File 2
5455
787
445-p
4356
2445
144
... (3 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)
I have a text file with a line of text that contains numbers and text formatted into groups. I need to extract the number that can be either 1,2 or 3 digits long. Then write it to a variable, but i need to remove any leading spaces in the number first.
I can get the numbers out but how to remove... (12 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)
Hello All,
This is a noob question. I tried searching for the answer but the answer found did not help me .
I have a file that can have duplicates.
100
200
300
400
100
150
the number 100 is duplicated twice. I want to find the duplicate along with the line number.
expected... (4 Replies)
Discussion started by: vatigers
4 Replies
LEARN ABOUT NETBSD
shuffle
SHUFFLE(1) BSD General Commands Manual SHUFFLE(1)NAME
shuffle -- print a random permutation of the command line arguments
SYNOPSIS
shuffle [-0] [-f filename ...] [-n number] [-p number] [arg] [...]
DESCRIPTION
The shuffle program prints a random permutation (or ``shuffle'') of its command line arguments. This can be useful in shell scripts for
selecting a random order in which to do a set of tasks, view a set of files, etc.
If the -f option is given, the data is taken from that files' contents or if the filename is - ``stdin''.
If the -n option is given, its argument is treated as a number, and the program prints a random permutation of the numbers greater than or
equal to 0 and less than the argument.
If the -p option is given, its argument is treated as a number, and the program prints that number of randomly selected lines or arguments in
a random order.
The -0 option changes the field separator character from
to , so that the output is suitable to be sent to xargs(1) (to handle filenames
with whitespace in them).
EXAMPLES
$ shuffle a b c d
c
b
d
a
$ shuffle -p 1 a b c d
d
$ shuffle -n 4 -p 2
0
3
SEE ALSO jot(1), random(6)HISTORY
The shuffle program first appeared in NetBSD 1.4.
AUTHORS
Written by Perry E. Metzger <perry@piermont.com>.
BSD February 18, 2009 BSD