LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 11-05-2015, 04:51 AM   #1
sleftar
Member
 
Registered: Sep 2015
Posts: 51

Rep: Reputation: Disabled
How placeholder works in Linux?


Hi guys I want to echo something like

Quote:
name="Josh"
echo "Hello $name"
How can I make it? Thanks.
 
Old 11-05-2015, 05:21 AM   #2
hortageno
Member
 
Registered: Aug 2015
Distribution: Ubuntu 22.04 LTS
Posts: 240

Rep: Reputation: 67
Quote:
Originally Posted by sleftar View Post
Hi guys I want to echo something like



How can I make it? Thanks.
First at all, it's not a placeholder, it's a variable. A placeholder would be something like "*" or "?".

You use it exactly how you did it in your example. Just put it in a script or execute it in a terminal like this

Code:
name="Josh";echo "Hello $name"
or

Code:
export name="Josh"
echo "Hello $name"
HTH
 
Old 11-05-2015, 05:21 AM   #3
HMW
Member
 
Registered: Aug 2013
Location: Sweden
Distribution: Debian, Arch, Red Hat, CentOS
Posts: 773
Blog Entries: 3

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
Originally Posted by sleftar View Post
How can I make it? Thanks.
You have already done it!
 
  


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
.placeholder files sulekha Ubuntu 2 09-08-2008 11:48 PM
Just white space in video placeholder..!! Hitboxx General 3 03-27-2007 11:13 AM
java-placeholder error mzizana Linux - Software 0 11-15-2006 01:17 AM
Changing placeholder eliw42 Linux - Networking 0 08-22-2006 02:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:21 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