Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Non-*NIX Forums > Programming
User Name
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.


  Search this Thread
Old 08-09-2010, 08:17 PM   #1
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,604

Rep: Reputation: 51
A question about shell scripts.


Could somebody tell me what the value of CODECSDIR will be after the line is executed/interpreted? This is the first time in the script where the variable CODECSDIR appears. Thanks in advance.

EDIT: also, when I am in the prompt, echo $CODECSDIR outputs nothing.

Last edited by stf92; 08-09-2010 at 08:21 PM.
Old 08-09-2010, 08:42 PM   #2
Senior Member
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Wheezy/Jessie/Stretch/Sid, Linux Mint DE
Posts: 4,605

Rep: Reputation: 686Reputation: 686Reputation: 686Reputation: 686Reputation: 686Reputation: 686
Because $CODECSDIR didn't exist yet it has been assigned a deafult value.

jlinkels@jlinkels-lt:/tmp$ CODECSDIR=${CODECSDIR:-/usr/lib/codecs}
jlinkels@jlinkels-lt:/tmp$ echo $CODECSDIR
1 members found this post helpful.
Old 08-09-2010, 09:01 PM   #3
Senior Member
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 3,604

Original Poster
Rep: Reputation: 51
Thank you. Your post has been very useful. Regards.



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
Question regarding start-up shell scripts pjdlmack Linux - Newbie 3 10-16-2009 12:23 AM
How to ssh from a shell script ? For ppl who can write shell scripts. thefountainhead100 Programming 14 10-22-2008 06:24 AM
Need help with shell scripts gudum35 Programming 11 02-23-2006 06:32 AM
shell scripts rocketgo Linux - General 10 12-01-2003 05:20 AM
shell scripts nautilus_1987 Linux - General 3 08-30-2002 03:12 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:51 AM.

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