04-21-2011
no it wont work for every file
coz the length is nothing but number of lines in file
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to get a total number of tapes w/out headers or footers in a ERV file and append it to the file. For some reason I cannot get it to work. Any ideas?
#!/bin/sh
dat=`date +"%b%d_%Y"`
+ date +%b%d_%Y
dat=Nov16_2006
tapemgr="/export/home/legato/tapemgr/rpts"... (1 Reply)
Discussion started by: gzs553
1 Replies
2. Shell Programming and Scripting
Hi,
Can anyone please give me the grep command to find all the lines in a file
that exceed 80 columns
Thanks,
gubbala (8 Replies)
Discussion started by: mrgubbala
8 Replies
3. Shell Programming and Scripting
Hi ,
How about find the total number of lines in a file ?
How can i do that with the "grep" command ? (9 Replies)
Discussion started by: Raynon
9 Replies
4. UNIX for Dummies Questions & Answers
I want to take the below data, and have it output to file only the STMC#/(IP address) and the "there are X number of updates to install" lines for each machine. I know it's easy, but Im a beginner in BASH stuff, my solution would probably take way too many lines to do something easy.Thanks!
... (5 Replies)
Discussion started by: glev2005
5 Replies
5. Shell Programming and Scripting
i have a file that's about 2GB, i have to get the total number of lines in this file every 10 minutes.
the interval is not an issue. i just need the proper, most efficient way to do this.
any ideas?
i got the following from another thread on this site, but:
awk 'int(100*rand())%5<1'... (12 Replies)
Discussion started by: SkySmart
12 Replies
6. UNIX for Dummies Questions & Answers
I have a text file with 1000 lines, I want to randomly select 200 lines from it and print them as output. How do I go about doing that? Thanks! (7 Replies)
Discussion started by: evelibertine
7 Replies
7. Shell Programming and Scripting
Hi
I need to select lines from a txt file, I have got a line starting with ZMIO:MSISDN= and after a few line I have another line starting with 'MOBILE STATION ISDN NUMBER' and another one starting with 'VLR-ADDRESS' I need to copy these three lines as three different columns in a separate... (3 Replies)
Discussion started by: Tlcm sam
3 Replies
8. Shell Programming and Scripting
Hi all,
I am new to AWK and I am trying to solve a problem that is probably easy for an expert. Suppose I have the following data file input.txt:
20 35 43
20 23 54
20 62 21
20.5 43 12
20.5 33 11
20.5 89 87
21 33 20
21 22 21
21 56 87
I want to select from all lines having the... (4 Replies)
Discussion started by: naska
4 Replies
9. Shell Programming and Scripting
Hello,
I want to get the maximum value of each record separated by empty line based on the 3rd column of each row within each record?
Input:
A1 chr5D 634 7 82 707
A2 chr5D 637 6 82 713
A3 chr5D 637 5 82 713
A4 chr5D 626 1 82 704... (4 Replies)
Discussion started by: yifangt
4 Replies
10. Shell Programming and Scripting
Trying to use awk to print the lines in file that have either REF or SNV in $3, add a header line, sort by $4 in numerical order. The below code does that already, but where I am stuck is on the last part where the total lines are counted and printed under Total_Targets, under Targets_less_than is... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT DEBIAN
mkusers
MKUSERS(8) System Manager's Manual MKUSERS(8)
NAME
MkUsers - Batch creating multiple XMail accounts
SYNOPSIS
MkUsers [options]
DESCRIPTION
This command line utility enable You to create user accounts structure by giving it a formatted list of users parameters or a formatted
text file. This utility can be also used to create a random number users, that is useful for me for testing the server performance.
OPTIONS
-a numusers
Number of users to create in auto-mode.
-d domain
Domain name in auto-mode.
-f inputFile
Input file name {stdin}.
-u username
Radix user name in auto-mode.
-r rootdir
Mail root path {./}.
-s mboxsize
Mailbox maximum size {10000}.
-i useridbase
Base user id {1}.
-m Create Maildir boxes.
-h show help message.
USAGE
Input file format is
domain;username;password;real-name;homepage[NEWLINE]
where a character # as the very first one in a line is used to comment the entire line.
If a file mailusers.tab already exist in mail root path MkUsers exit without overwriting the existing copy. This protect You by accidental
overwriting of Your file when playing inside the real MAIL_ROOT directory. So if You want to setup the root directory ( -r ... ) as
MAIL_ROOT You must delete by hand the existing file. If You setup the root directory ( -r ... ) as MAIL_ROOT You MUST have XMail stopped
before running MkUsers. Existing files and directories will be not overwrited by MkUsers so You can keep Your users db into the formatted
text file ( or generate it by a database dump for example ) and run MkUsers to create the structure. Remeber that You've to add new domains
in domains.tab file by hand.
NOTES
MkUsers is intended as a bulk-mode utility, not to create single users coz for this need CtrlClnt ( or other GUI/Web configuration utili-
ties ) is better suited.
SEE ALSO
CtrlClnt(1), XMail(8).
AUTHOR
XMail program was written by Davide Libenzi <davidel@xmailserver.org>. This manual page was written by Radim Kolar <hsn@cybermail.net>,
for the Debian GNU/Linux system (but may be used by others).
March 12, 2002 MKUSERS(8)