LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-02-2008, 09:07 PM   #1
confulity
LQ Newbie
 
Registered: Mar 2008
Location: Philippines
Distribution: Red Hat Fedora
Posts: 8

Rep: Reputation: 0
Question Problem with Fedora Shell Scripting.. Newbie here..


Hi guys, i am just a newbie in using LINUX..

I have this tutorial from CBT that teaches somethings about Red Hat, since I researched that Fedora Core 6 is affiliated by Red Hat I assumed that they have the same functionalities..

My Question is this, is the command used to create shell scripts in Red Hat the same with creating shell scripts in Fedora Core 6? because I just follow the tutorials in CBT and it is not behaving well in Fedora Core 6..

Thanks guys..

Last edited by confulity; 03-03-2008 at 02:05 AM.
 
Old 03-02-2008, 09:10 PM   #2
snowman81
Member
 
Registered: Aug 2006
Location: Michigan
Distribution: Ubuntu
Posts: 282

Rep: Reputation: 30
I'm pretty sure Redhat is the name of the company. If you mean the old Redhat versions (i.e 8.0, 9.0) then I doubt they would work because of updated libraries and such.

As for your font, I don't know if others will have a problem with it so I won't say anything for now...
 
Old 03-02-2008, 09:15 PM   #3
phantom_cyph
Senior Member
 
Registered: Feb 2007
Location: The Tropics
Distribution: Slackware & Derivatives
Posts: 2,472
Blog Entries: 1

Rep: Reputation: 128Reputation: 128
Dumb question maybe, but what shell are you using? Scripting has more to do with the shell than the system in some ways. As for your font, it would be appreciated if you would use it in 60 years when I'll need bigger font to see, but as for now, its very "loud".
 
Old 03-02-2008, 11:09 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Agree about the font, don't use bold (except for emphasis).
Also, we'll need to see what you your code is and the errors. 'Not behaving well' tells us nothing useful.
 
Old 03-08-2008, 01:27 AM   #5
confulity
LQ Newbie
 
Registered: Mar 2008
Location: Philippines
Distribution: Red Hat Fedora
Posts: 8

Original Poster
Rep: Reputation: 0
sorry for the text.. guys, this the demonstration in the tutorials from cbt in creating simple scripts

the code from CBT:

http://i243.photobucket.com/albums/f...uxproblem1.jpg


the output from CBT code:

http://i243.photobucket.com/albums/f...uxproblem2.jpg



Now, this is my code. I just do the things that is stated from the tutorial:

http://i243.photobucket.com/albums/f...uxproblem3.jpg


And this is the output from my code...

http://i243.photobucket.com/albums/f...uxproblem4.jpg


guys, help me with this problem, thank you!
 
Old 03-08-2008, 01:37 AM   #6
livetoday
Member
 
Registered: Jun 2006
Location: India
Distribution: RHEL,Suse,Fedora
Posts: 106

Rep: Reputation: 15
you have typed an extra $ with 'Space' variable.

Code:
$SPACE="command"
correct syntax would be
Code:
SPACE="command"
Quote:
Originally Posted by confulity View Post
sorry for the text.. guys, this the demonstration in the tutorials from cbt in creating simple scripts

the code from CBT:

http://i243.photobucket.com/albums/f...uxproblem1.jpg


the output from CBT code:

http://i243.photobucket.com/albums/f...uxproblem2.jpg



Now, this is my code. I just do the things that is stated from the tutorial:

http://i243.photobucket.com/albums/f...uxproblem3.jpg


And this is the output from my code...

http://i243.photobucket.com/albums/f...uxproblem4.jpg


guys, help me with this problem, thank you!
 
Old 03-08-2008, 08:47 AM   #7
confulity
LQ Newbie
 
Registered: Mar 2008
Location: Philippines
Distribution: Red Hat Fedora
Posts: 8

Original Poster
Rep: Reputation: 0
http://i243.photobucket.com/albums/f...uxproblem5.jpg

here's my updated syntax, still not behaving correctly.. now it is exactly the same syntax with the syntax from the CBT tutorial..
 
Old 03-08-2008, 09:07 AM   #8
LasseW
Member
 
Registered: Oct 2004
Distribution: Fedora 7, OpenSuse 10.2
Posts: 108

Rep: Reputation: 15
Use backticks instead of quotes, ie

SPACE=`du -s|cut -f1`

An alternative syntax is

SPACE=$(du -s|cut -f1)
 
Old 03-08-2008, 09:31 AM   #9
confulity
LQ Newbie
 
Registered: Mar 2008
Location: Philippines
Distribution: Red Hat Fedora
Posts: 8

Original Poster
Rep: Reputation: 0
this is the updated code sorry, i have posted the wrong images

http://i243.photobucket.com/albums/f...uxproblem6.jpg

This is the output

http://i243.photobucket.com/albums/f...uxproblem5.jpg
 
Old 03-08-2008, 10:01 AM   #10
confulity
LQ Newbie
 
Registered: Mar 2008
Location: Philippines
Distribution: Red Hat Fedora
Posts: 8

Original Poster
Rep: Reputation: 0
PROBLEM SOLVED!

Thank you very much guys, the world is blessed because of you guys..
 
Old 03-09-2008, 10:21 AM   #11
confulity
LQ Newbie
 
Registered: Mar 2008
Location: Philippines
Distribution: Red Hat Fedora
Posts: 8

Original Poster
Rep: Reputation: 0
I solved the problem by the replacing the ' "single quote" with ` "backticks".;. thanks very much guys..
 
  


Reply



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
newbie scripting: Writeing a Shell script Qu hoodedmanwithsythe Programming 12 06-10-2007 07:54 AM
newbie shell scripting need help word count air23forlife Programming 1 03-22-2007 01:12 PM
Shell scripting help -- newbie rnj Linux - Newbie 1 09-12-2005 12:08 AM
Shell Scripting problems (newbie) yawgmoth81 Programming 11 02-24-2003 02:31 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:38 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration