I know uniq exists, but am not sure how to remove repeating lines when they are groups of two different lines repeating themselves, without using sort. I need them to be sorted in the original order, just to remove repeats.
Code:
cd /media/AUDIO/WAVE/9780743518673/mp3
~/Desktop/mp3-to-m4b 9780743518673-GOOD GERMAN "GOOD GERMAN" "Joseph Kanon" 2004
n
cd /media/AUDIO/WAVE/9780743518673/mp3
~/Desktop/mp3-to-m4b 9780743518673-GOOD GERMAN "GOOD GERMAN" "Joseph Kanon" 2004
n
cd /media/AUDIO/WAVE/9780743518673/mp3
~/Desktop/mp3-to-m4b 9780743518673-GOOD GERMAN "GOOD GERMAN" "Joseph Kanon" 2004
n
cd /media/AUDIO/WAVE/9780743518673/mp3
~/Desktop/mp3-to-m4b 9780743518673-GOOD GERMAN "GOOD GERMAN" "Joseph Kanon" 2004
n
cd /media/AUDIO/WAVE/9780743518802/mp3
~/Desktop/mp3-to-m4b 9780743518802-NEVER CHANGE "NEVER CHANGE" "Elizabeth Berg" 2004
n
cd /media/AUDIO/WAVE/9780743518802/mp3
~/Desktop/mp3-to-m4b 9780743518802-NEVER CHANGE "NEVER CHANGE" "Elizabeth Berg" 2004
n
cd /media/AUDIO/WAVE/9780743518802/mp3
~/Desktop/mp3-to-m4b 9780743518802-NEVER CHANGE "NEVER CHANGE" "Elizabeth Berg" 2004
n
cd /media/AUDIO/WAVE/9780743518802/mp3
~/Desktop/mp3-to-m4b 9780743518802-NEVER CHANGE "NEVER CHANGE" "Elizabeth Berg" 2004
n
cd /media/AUDIO/WAVE/9780743518802/mp3
~/Desktop/mp3-to-m4b 9780743518802-NEVER CHANGE "NEVER CHANGE" "Elizabeth Berg" 2004
n
cd /media/AUDIO/WAVE/9780743518840/mp3
~/Desktop/mp3-to-m4b 9780743518840-SQUANDERING AIMLESSLY "SQUANDERING AIMLESSLY" "David Brancaccio" 2004
n
cd /media/AUDIO/WAVE/9780743518840/mp3
~/Desktop/mp3-to-m4b 9780743518840-SQUANDERING AIMLESSLY "SQUANDERING AIMLESSLY" "David Brancaccio" 2004
n
cd /media/AUDIO/WAVE/9780743518840/mp3
~/Desktop/mp3-to-m4b 9780743518840-SQUANDERING AIMLESSLY "SQUANDERING AIMLESSLY" "David Brancaccio" 2004
n
cd /media/AUDIO/WAVE/9780743518840/mp3
~/Desktop/mp3-to-m4b 9780743518840-SQUANDERING AIMLESSLY "SQUANDERING AIMLESSLY" "David Brancaccio" 2004
n
Please help to remove. I colored the repeats to show what I want deleted.
Can someone help me with the following 2 objectives?
1) The following command is just an example. It gets a list of all print jobs. From there I am trying to extract the printer name. It works with the following command:
lpstat -W "completed" -o | awk -F- '{ print $1}'
Problem is, I want... (6 Replies)
I need to add the content of file1 to file2 - all lines but not those existing in file2 already, so the "cat file1 >> file2" doesn't work.
For example,
file1:
100 xxxxxx str1
102 xxxxxx str2
File2:
50 xxxxxxx xxx
30 xxxxxxxxxxx
102 xxxxxx str2 xxxx
......
the result:
50 xxxxxxx... (9 Replies)
Hi
I am trying to locate all strings seperated by the string -CR-, the string will have an unknown number of these -CR- strings, I've used the regex:
^(?:(.*?)-CR-)+$
As shown in the test code:
my ($myString)="This is the first line-CR-second line-CR-third line-CR-fourth... (3 Replies)
I want a shell script that will traverse a file system starting at specific path.
And look at all file names for repeating sequences of and remove them from the file name.
The portion of the name that gets removed has to be a repeating sequence of the same characters.
So the script would... (3 Replies)
Hello,
I have file to work with. It has 5 columns. The first three, altogether, constitutes the position. The 4th column contains some values for downstream analysis and the fifth column contains some values that I want to add to 4th column (only if they happen to be in the same position).
My... (5 Replies)
Hi,
I have catenated multiple output files (from a monte carlo run) into one big output file. Each individual file has it's own two line header. So when I catenate, there are multiple two line headers (of the same wording) within the big file. How do I use the sed command to search for the... (1 Reply)
My file is in a good column format but several lines in the file begin with a zero. I'm in KSH and looking for a command to remove this zero and keep the text next to it. I don't want any of the zeros in the other columns removed.
Below is a snip from the file... all I need to do is remove that... (2 Replies)
Hi,
I need to find the lines which are repeating in a file
cat file1
abcdef 23-1
abcdef 24-1
bcdeff 25-0
ttdcfg 26-0
ttdcfg 20-0
bcdef1 25-0
bcdef2 25-0
bcdef3 25-0
bcdef4 25-0
bcdef4 00-0any help is greatly appreciated. Thanks in advance.
In need to find which one are... (3 Replies)
The bash below executes and seems to work fine on those files in which . However on those files where there is no additional CNV detected that line repeats multiple times
instead of only once. I tried adding an END as all lines are printed but that doesn't help. I can not seem to solve this... (5 Replies)
Discussion started by: cmccabe
5 Replies
LEARN ABOUT DEBIAN
mp3tag
MP3TAG(1) General Commands Manual MP3TAG(1)NAME
mp3tag - view and manipulate ID3v1 tags.
SYNOPSIS
mp3tag [ -s song ] [ -a artist ] [ -l album ] [ -y year ] [ -e comment ] [ -k track ] [ -g genre ] [ -r ] file [ file ... ]
DESCRIPTION
This manual page briefly documents the mp3tag command. This manual page was written for the Debian GNU/Linux distribution because the orig-
inal program does not have one.
mp3tag is a program that allows you to both view and manipulate ID3v1 metadata tags. Running the command with just a filename will display
the file's current tag. Setting some options will cause the tag to be updated and displayed.
OPTIONS -a artist
Set the artist name to artist. Strings over thirty characters are truncated.
-e comment
Set the comment to comment. Strings over thirty characters are truncated.
-g genre
Set the genre to genre. This is a single integer with a value of 0 to 254 corresponding to the appropriate Winamp compatible genre
(use '-g list' to list all supported genres).
-k track
Set the track number to track. This is a single integer with a value of 0 to 255. Specifying this field truncates the comment field
to twenty-eight characters, as per the ID3v1.1 standard.
-l album
Set the album name to album. Strings over thirty characters are truncated.
-r Merge new tag with any preexisting tag in the file.
-s song
Set the song name to song. Strings over thirty characters are truncated.
-y year
Set the year to year. Strings over four characters are truncated.
EXAMPLES
Display foo.mp3's current ID3v1 info:
mp3tag foo.mp3
Set foo.mp3's artist to 'Bar', and album to 'Baz':
mp3tag -a Bar -l Baz foo.mp3
Set foo.mp3's year to 2001, merging it with any tag already present:
mp3tag -y 2001 -r foo.mp3
AUTHOR
mp3tag was written by Bram Avontuur <bram@avontuur.org>.
This manual page was written by Brian Boucheron <brian@boucheron.org>, for the Debian GNU/Linux distribution (but may be used by others).
SEE ALSO
More info on ID3v1 can be found at <http://www.id3.org/id3v1.html>.
February 19, 2004 MP3TAG(1)