Hello all.
Sorry, I know this question is similar to many others, but I just can seem to put together exactly what I need.
My file is tab delimitted and contains approximately 1 million rows. I would like to send lines 1,4,& 7 to a file. Lines 2, 5, & 8 to a second file. Lines 3, 6, & 9 to... (11 Replies)
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
Hi,
I search all forum, but I can not find solutions of my problem :(
I have multiple files (5000 files), inside there is this data :
FILE 1:
1195.921 -898.995 0.750312E-02-0.497526E-02 0.195382E-05 0.609417E-05
-2021.287 1305.479-0.819754E-02 0.107572E-01 0.313018E-05 0.885066E-05
... (15 Replies)
I have a file that contains 87 lines, each with a set of coordinates (x & y). This file looks like:
1 200.3 -0.3
2 201.7 -0.32
...
87 200.2 -0.314
I have another file which contains data that was taken at certain of these 87 positions. i.e.:
37 125
42 175
86 142
where the first... (1 Reply)
Hi I have a file with over a million lines (rows) and I want to split everything from 500,000 to a million into another file (to make the file smaller). Is there a simple command for this?
Thank you
Phil (4 Replies)
Hi
i have requirement like below
M <form_name> sdasadasdMklkM
D ......
D .....
M form_name> sdasadasdMklkM
D ......
D .....
D ......
D .....
M form_name> sdasadasdMklkM
D ......
M form_name> sdasadasdMklkM
i want split file based on line number by finding... (10 Replies)
Hi,
Need to sort file based on the number of delimeters in the lines.
cat testfile
/home/oracle/testdb
/home
/home/oracle/testdb/newdb
/home/oracle
Here delimeter is "/"
expected Output:
/home/oracle/testdb/newdb
/home/oracle/testdb
/home/oracle
/home (3 Replies)
Hi friends, here is my problem.
I have three files like this..
cat file1.txt
=======
unix is best
unix is best
linux is best
unix is best
linux is best
linux is best
unix is best
unix is best
cat file2.txt
========
Windows performs better
Mac OS performs better
Windows... (4 Replies)
Dear Experts
my scenario is as follows...
I have one source folder "Source" and 2 target folders "Target_123456" & "Target_789101". I have 2 series of files. 123456 series and 789101 series. Each series has got 3 types of fiels "Debit", "Refund", "Claims".
All files are getting... (17 Replies)
Discussion started by: phani333
17 Replies
LEARN ABOUT FREEBSD
random
RANDOM(6) BSD Games Manual RANDOM(6)NAME
random -- random lines from a file or random numbers
SYNOPSIS
random [-elrUuw] [-f filename] [denominator]
DESCRIPTION
Random has two distinct modes of operations. The default is to read in lines from the standard input and randomly write them out to the
standard output with a probability of 1 / denominator. The default denominator for this mode of operation is 2, giving each line a 50/50
chance of being displayed.
The second mode of operation is to read in a file from filename and randomize the contents of the file and send it back out to standard out-
put. The contents can be randomized based off of newlines or based off of space characters as determined by isspace(3). The default
denominator for this mode of operation is 1, which gives each line a chance to be displayed, but in a random(3) order.
The options are as follows:
-e If the -e option is specified, random does not read or write anything, and simply exits with a random exit value of 0 to denominator
- 1, inclusive.
-f filename
The -f option is used to specify the filename to read from. Standard input is used if filename is set to '-'.
-l Randomize the input via newlines (the default).
-r The -r option guarantees that the output is unbuffered.
-U Tells random(6) that it is okay for it to reuse any given line or word when creating a randomized output.
-u Tells random(6) not to select the same line or word from a file more than once (the default). This does not guarantee uniqueness if
there are two of the same tokens from the input, but it does prevent selecting the same token more than once.
-w Randomize words separated by isspace(3) instead of newlines.
SEE ALSO random(3), fortune(6)HISTORY
The functionality to randomizing lines and words was added in 2003 by Sean Chittenden <seanc@FreeBSD.org>.
BUGS
No index is used when printing out tokens from the list which makes it rather slow for large files (10MB+). For smaller files, however, it
should still be quite fast and efficient.
BSD February 8, 2003 BSD