• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Unix command help

Rigas

Limp Gawd
Joined
Apr 3, 2005
Messages
193
Whats up guys, I am trying to learn Unix commands and I was wondering if there were a way to take a file and remove all the instances of words appearing multiple times.

I ran
wc -w ad
and got that there were 321 words, but what I was wondering was if I could locate only the unique words, those that don't appear more than one time in the file. The file I was using was:
Code:
Network World    October 17, 2008

Mobile Firefox alpha code now online;
Windows Mobile version also in the works


Mozilla Wednesday formally released the alpha version of its mobile Firefox
browser, dubbed Fennec. The mobile browser, which uses much of the same code
found in desktop Firefox, currently is being released for the Nokia N800 and
N810 Internet Tablets, but Mozilla has also released code to run it on desktop
PCs (Windows, Mac OS, and Linux), so a wider group of Mozilla community
developers can start to exercise it.

Meanwhile, a Windows Mobile version of Fennec is in a very early stage of
development. Mozilla just posted a screen shot of Fennec on Windows Mobile, and
one from a PC-based emulator. Both show the trade-offs involved in having a
small screen that has to be shared by both navigation controls and content.

By contrast, the touch version of Fennec is designed to use almost every
pixel on the device screen for Web content. The controls, bars and other
navigation features are hidden off to either side. You uncover them by dragging
or flicking the page to one side or the other. Mozilla has now posted a video
walk-through of the alpha user interface.

The Ars Technica blog reviewed an early build of Fennec in April.

Full release notes for Fennec are online, along with a wiki on the mobile project.

Fennec is one of a new flock of Web browsers designed to make the Web a
reality for mobile users. Apple's iPhone with its innovative use of a touch
screen, coupled with the full-blown Safari Web browser, has proven successful 
in making it far easier for users to work and play on the Web.

These new-generation browsers typically combine the same HTML rendering
engines used by desktop browsers, with a radically redesigned user interface 
to compensate for the absence of conventional keyboard and mouse.

                      Copyright 2008 Networld World, Inc.
                              All Rights Reserved

I was working through a book and this was in the translate (tr) section of the book. Any help would be awesome guys, thanks.
 
uniq, sort, grep and a forth command I learned of just last week that can
(iirc) reformat "into" and maybe out of columns. google your question in
"6 words or less" form and you might find several pipe-commands.
..............
others here might know a long pipe-command already by practice. So if
you wait you may save the internet search
..........
have to log off or I could spend 10 min. searching for that fourth command
 
You can probably do it with sed only, but this seems to work (even if it's a bit roundabout)

Code:
sed -e "s/[ .,;:?\!\(\)]/\n/g" < textfile.txt | grep "." | sort | uniq -iu

The sed expression segments the text by replacing some common delimiters with newlines. The grep picks up lines which aren't empty (not strictly necessary), the result is sorted and sent to uniq which displays only the unique lines, ignoring case.

Hope you get a good grade!
 
Back
Top