04-24-2011
Thanks for your reply ahamed but I need to extract random columns like if I say I want to extract 50 random columns it should extract it randomly from all the columns, lets say it extracts the column no. 10, 28, 40, 57, 92, 500, 740, 2540, ... or any other columns for that matter but it should be random and not ordered.
Ofcouse the total no. of columns and rows are fixed in that file and 'n' the number of random columns required can vary.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hallo
I have maybe a little bit advanced request....
I need to choose one random part betwen %....
so i have this..
%
text1 text1 text1
text1 text1 text1
text1 text1 text1
%
text2 text2
text2 text2 text2
%
text3 text3 text3
tetx3
%
this choose text between %
awk ' /%/... (8 Replies)
Discussion started by: sandwich
8 Replies
2. Shell Programming and Scripting
Hi,
I have written a choice based shell script some thing like this:
if (y)
execute code
....
fi
else if(n)
terminating
the problem with the above scripting is it will work as far as the options are y or n.
but i want to reiterate the same code when the user inputs something else... (1 Reply)
Discussion started by: sunrexstar
1 Replies
3. Ubuntu
Hi
I am new to expect. Please if any one can help on my issue its really appreciable. here is my issue:
I want expect script for random passwords and random commands generation.
please can anyone help me?
Many Thanks in advance (0 Replies)
Discussion started by: vanid
0 Replies
4. What is on Your Mind?
Currently in the process of looking for a tablet. Which one is best? Thanks Benjamin Mauerberger (9 Replies)
Discussion started by: hlinks12
9 Replies
5. Shell Programming and Scripting
Hello,
I want to choose random columns from big file.
for example: My file contain around 21000 columns and I want to randomly extract 4000 columns from this file.
Anybody has a solution (may be one liner or a function in perl or awk) for this?
Thanks,
R (2 Replies)
Discussion started by: ryan9011
2 Replies
6. Shell Programming and Scripting
Need to use dd to generate a large file from a sample file of random data. This is because I don't have /dev/urandom.
I create a named pipe then:
dd if=mynamed.fifo do=myfile.fifo bs=1024 count=1024
but when I cat a file to the fifo that's 1024 random bytes:
cat randomfile.txt >... (7 Replies)
Discussion started by: Devyn
7 Replies
7. Shell Programming and Scripting
Dear folks
I have a large data set which contains 400K columns. I decide to select 50K determined columns from the whole 400K columns. Is there any command in unix which could do this process for me? I need to also mention that I store all of the columns id in one file which may help to select... (5 Replies)
Discussion started by: sajmar
5 Replies
8. Shell Programming and Scripting
Hi,
I need to write a bash script that will random choose and login into these below ip addresses.
192.168.116.130
192.168.116.131
192.168.116.132
192.168.116.133
I'm new into scripting and I need to enhance my logic. Below is what i did
... (4 Replies)
Discussion started by: Milon
4 Replies
9. UNIX for Beginners Questions & Answers
Okay, I have an Asus A8NSLI board with an Athlon 64 and I dunno, maybe 8gig Ram and Windows has crashed for the last time so I've finally had enough and I'll make it a Unix machine.
I have a new 1Tera drive and I'm all set to go.
Which brand of Unix/Linux can you advise me to go for?
The... (3 Replies)
Discussion started by: abrogard
3 Replies
COLUMN(1) BSD General Commands Manual COLUMN(1)
NAME
column -- columnate lists
SYNOPSIS
column [-tx] [-c columns] [-s sep] [file ...]
DESCRIPTION
The column utility formats its input into multiple columns. Rows are filled before columns. Input is taken from file operands, or, by
default, from the standard input. Empty lines are ignored.
The options are as follows:
-c Output is formatted for a display columns wide.
-s Specify a set of characters to be used to delimit columns for the -t option.
-t Determine the number of columns the input contains and create a table. Columns are delimited with whitespace, by default, or with
the characters supplied using the -s option. Useful for pretty-printing displays.
-x Fill columns before filling rows.
ENVIRONMENT
The COLUMNS, LANG, LC_ALL and LC_CTYPE environment variables affect the execution of column as described in environ(7).
EXIT STATUS
The column utility exits 0 on success, and >0 if an error occurs.
EXAMPLES
(printf "PERM LINKS OWNER GROUP SIZE MONTH DAY " ;
printf "HH:MM/YEAR NAME
" ;
ls -l | sed 1d) | column -t
SEE ALSO
colrm(1), ls(1), paste(1), sort(1)
HISTORY
The column command appeared in 4.3BSD-Reno.
BUGS
Input lines are limited to LINE_MAX (2048) bytes in length.
BSD
July 29, 2004 BSD