LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 02-18-2011, 05:34 PM   #1
eparl
LQ Newbie
 
Registered: Feb 2011
Posts: 6

Rep: Reputation: 0
rm command problem


if -i rm .o .y; in it113student; echo successful else echo failed fi
trying to get this to work ?
 
Old 02-18-2011, 05:45 PM   #2
Reuti
Senior Member
 
Registered: Dec 2004
Location: Marburg, Germany
Distribution: openSUSE 13.1
Posts: 1,320

Rep: Reputation: 252Reputation: 252Reputation: 252
What should this command sequence do in the end?
 
Old 02-18-2011, 05:45 PM   #3
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
Hi, welcome to LQ!,

What is it meant to do? What language is it?


Cheers,
Tink
 
Old 02-18-2011, 06:56 PM   #4
eparl
LQ Newbie
 
Registered: Feb 2011
Posts: 6

Original Poster
Rep: Reputation: 0
this is supposed to delete .o or.y file and answer if successful or failed this is in ubuntu terminal. any help is appriciated even if a link to a site that can explain this but I have been to a great number of sites and they are not real helpful.


Thank you for the advice and assistance

Last edited by eparl; 02-19-2011 at 03:04 PM.
 
Old 02-18-2011, 07:07 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,000
Blog Entries: 11

Rep: Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893Reputation: 893
Quote:
Originally Posted by eparl View Post
this is supposed to delete .o or.y file and answer if successful or failed this is in ubuntu terminal. any help is appriciated even if a link to a site that can explain this but I have been to a great number of sites and they are not real helpful.
And what part is the
Code:
in it113student
supposed to play?
 
Old 02-19-2011, 08:15 AM   #6
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714Reputation: 714
Quote:
Originally Posted by eparl View Post
if -i rm .o .y; in it113student; echo successful else echo failed fi
trying to get this to work ?
What is the "-i" before the "rm" for??? If it's rm's intercative option, it must go after "rm" becasue it's and argument to rm. What you're saying now is to run the command named "-i" with the arguments "rm", ".o", and ".y".

What does the "in is113student" for? It's totally invalid syntax, and even if it was, there is no "in" command. If you meant the run this in the directory "it113student", you should run "cd it113student" before all this. Remember, prgramming languages are not like humen languages, computers can't "figure out" what you mean. It has to comply to an exact specification or the computer will get none of it.

If I correctly understood you wanted to do, I think this is what your script should look like:

Code:
cd it113student
if rm -i .o .y
then
    echo successful
else
    echo failed
fi

Last edited by MTK358; 02-19-2011 at 08:17 AM.
 
Old 02-19-2011, 03:05 PM   #7
eparl
LQ Newbie
 
Registered: Feb 2011
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you for the advice and assistance it's nice to see that someone is willing to help someone who is trying to learn this.

Last edited by eparl; 02-19-2011 at 03:07 PM.
 
  


Reply

Tags
shell?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with auditreduce command and praudit command preetishetty Linux - Security 0 12-03-2007 09:24 AM
A tr command problem baks Programming 10 05-31-2007 08:03 AM
at Command Problem BBPS Linux - Software 2 09-06-2006 06:23 AM
problem with dd command ? MaaSTaaR Linux - General 5 06-25-2006 08:50 AM
problem in cp command ksriram03 Linux - Newbie 2 03-15-2006 12:12 PM


All times are GMT -5. The time now is 05:36 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration