06-25-2012
I'm a newbie myself, and this is probably not the best way.. but you could do, for instance:
cat yourfile yourfile > newfile (to print every line in yourfile twice; cat yourfile yourfile yourfile to print them three times etc.).
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am doing KSH script to remove duplicate lines in a file. Let say the file has format below.
FileA
1253-6856
3101-4011
1827-1356
1822-1157
1822-1157
1000-1410
1000-1410
1822-1231
1822-1231
3101-4011
1822-1157
1822-1231
and I want to simply it with no duplicate line as file... (5 Replies)
Discussion started by: Teh Tiack Ein
5 Replies
2. UNIX for Advanced & Expert Users
Hi,
I have a file with duplicate lines in it. I want to keep only the duplicate lines and delete the non duplicates. Can some one please help me?
Regards
Narayana Gupta (3 Replies)
Discussion started by: guptan
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I am having a file which contains many duplicate lines. I wanted to redirect these duplicate lines into another file.
Suppose I have a file called file_dup.txt which contains some line as
file_dup.txt
A100-R1
ACCOUNTING-CONTROL
ACTONA-ACTASTOR
ADMIN-AUTH-STATS
ACTONA-ACTASTOR... (3 Replies)
Discussion started by: zing_foru
3 Replies
4. UNIX for Dummies Questions & Answers
I have a log file "logreport" that contains several lines as seen below:
04:20:00 /usr/lib/snmp/snmpdx: Agent snmpd appeared dead but responded to ping
06:38:08 /usr/lib/snmp/snmpdx: Agent snmpd appeared dead but responded to ping
07:11:05 /usr/lib/snmp/snmpdx: Agent snmpd appeared dead but... (18 Replies)
Discussion started by: Nysif Steve
18 Replies
5. Shell Programming and Scripting
Hi All,
I am trying to remove the duplicate entries in a file and print them just once. For example, if my input file has:
00:44,37,67,56,15,12
00:44,34,67,56,15,12
00:44,58,67,56,15,12
00:44,35,67,56,15,12
00:59,37,67,56,15,12
00:59,34,67,56,15,12
00:59,35,67,56,15,12... (7 Replies)
Discussion started by: faiz1985
7 Replies
6. UNIX for Advanced & Expert Users
Hi All,
I have a very huge file (4GB) which has duplicate lines. I want to delete duplicate lines leaving unique lines. Sort, uniq, awk '!x++' are not working as its running out of buffer space.
I dont know if this works : I want to read each line of the File in a For Loop, and want to... (16 Replies)
Discussion started by: krishnix
16 Replies
7. Shell Programming and Scripting
Hey guys, need some help to fix this script. I am trying to remove all the duplicate lines in this file.
I wrote the following script, but does not work. What is the problem?
The output file should only contain five lines:
Later! (5 Replies)
Discussion started by: Ernst
5 Replies
8. UNIX for Advanced & Expert Users
Hi,
I copied the contents of a binary file into a .text file using hd (hexdump) command. The data in binary file is such that I get in many places like following
00000250 00 00 00 00 3f 2d 91 68 3f 69 fb e7 00 00 00 00 |....?-.h?i......|
00000260 00 00 00 00 00 00 00 00 00 00 00 00 00... (2 Replies)
Discussion started by: KidD312
2 Replies
9. Shell Programming and Scripting
hello all
in my bash script I have a file and I only want to keep the lines that appear twice in the file.Is there a way to do this?
thanks in advance! (4 Replies)
Discussion started by: vlm
4 Replies
10. Shell Programming and Scripting
Hi,
I have a csv file which contains some millions of lines in it.
The first line(Header) repeats at every 50000th line. I want to remove all the duplicate headers from the second occurance(should not remove the first line).
I don't want to use any pattern from the Header as I have some... (7 Replies)
Discussion started by: sudhakar T
7 Replies
UUCP(1) General Commands Manual UUCP(1)
NAME
uucp - unix to unix copy
SYNOPSIS
uucp [ -acCdfmr ] [ -nuser ] [ -ggrade ] [ -sspool ] [ -xdebug ] source-file.... destination-file
DESCRIPTION
Uucp copies files named by the source-file arguments to the destination-file argument. A file name may be a pathname on your machine, or
may have the form
system-name!pathname
where `system-name' is taken from a list of system names that uucp knows about. Shell metacharacters ?*[] appearing in the pathname part
will be expanded on the appropriate system.
Pathnames may be one of:(1) a full pathname;
(2) a pathname preceded by ~user; where user is a userid on the specified system and is replaced by that user's login directory;
(3) a pathname prefixed by ~, where ~ is expanded into the system's public directory (usually /usr/spool/uucppublic);
(4) a partial pathname, which is prefixed by the current directory.
If the result is an erroneous pathname for the remote system, the copy will fail. If the destination-file is a directory, the last part of
the source-file name is used.
Uucp preserves execute permissions across the transmission and gives 0666 read and write permissions (see chmod(2)).
The following options are interpreted by uucp.
-a Avoid doing a getwd to find the current directory. (This is sometimes used for efficiency.)
-c Use the source file when copying out rather than copying the file to the spool directory. (This is the default.)
-C Copy the source file to the spool directory and transmit the copy.
-d Make all necessary directories for the file copy. (This is the default.)
-f Do not make intermediate directories for the file copy.
-ggrade
Grade is a single letter/number; lower ASCII sequence characters will cause a job to be transmitted earlier during a particular con-
versation. Default is `n'. By way of comparison, uux(1C) defaults to `A'; mail is usually sent at `C'.
-m Send mail to the requester when the copy is complete.
-nuser Notify user on remote system (i.e., send user mail) that a file was sent.
-r Do not start the transfer, just queue the job.
-sspool
Use spool as the spool directory instead of the default.
-xdebug
Turn on the debugging at level debug.
FILES
/usr/spool/uucp - spool directory
/etc/uucp/* - data and configuration files
SEE ALSO
uux(1C), mail(1)
D. A. Nowitz and M. E. Lesk, A Dial-Up Network of UNIX Systems.
D. A. Nowitz, Uucp Implementation Description.
WARNING
The domain of remotely accessible files can (and for obvious security reasons, usually should) be severely restricted. You will very
likely not be able to fetch files by pathname; ask a responsible person on the remote system to send them to you. For the same reasons you
will probably not be able to send files to arbitrary pathnames.
BUGS
All files received by uucp will be owned by the uucp administrator (usually UID 5).
The -m option will only work sending files or receiving a single file. (Receiving multiple files specified by special shell characters
?*[] will not activate the -m option.)
At present uucp cannot copy to a system several "hops" away, that is, a command of the form
uucp myfile system1!system2!system3!yourfile
is not permitted. Use uusend(1C) instead.
When invoking uucp from csh(1), the `!' character must be prefixed by the `' escape to inhibit csh's history mechanism. (Quotes are not
sufficient.)
Uucp refuses to copy a file that does not give read access to ``other''; that is, the file must have at least 0444 modes.
7th Edition April 24, 1986 UUCP(1)