LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 09-05-2012, 09:02 AM   #1
sbgirl54
LQ Newbie
 
Registered: Aug 2012
Location: France
Posts: 6

Rep: Reputation: Disabled
Talking konsole won't set variables


Hey guys,

I'm not sure if this is a real problem or I just don't know what I'm doing. I'm trying to set a string variable in the shell. (I'm under SUSE)

I'm doing this:


seib@linux-fhrs:~> set name = some_name
seib@linux-fhrs:~> echo $name

seib@linux-fhrs:~> $?name
If '0name' is not typo you can use command-not-found to lookup the package that contains it, like this:
cnf 0name
seib@linux-fhrs:~>


I also looked in $ env and 'name' wasn't in the list. What am I doing wrong?

Also, how do you copy text from the konsole?
 
Old 09-05-2012, 09:08 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,910

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
this syntax is valid for tcsh. Probably you are using bash, execute echo $0 to check it.
 
1 members found this post helpful.
Old 09-05-2012, 11:22 AM   #3
sbgirl54
LQ Newbie
 
Registered: Aug 2012
Location: France
Posts: 6

Original Poster
Rep: Reputation: Disabled
Yes, I am executing bash.

seib@linux-fhrs:~> echo $0
/bin/bash
seib@linux-fhrs:~>

That's why all my scripts start with #!/bin/bash .

Is it possible to set variables in bash, and what is the appropriate syntax?
 
Old 09-05-2012, 11:33 AM   #4
sbgirl54
LQ Newbie
 
Registered: Aug 2012
Location: France
Posts: 6

Original Poster
Rep: Reputation: Disabled
Ha, I went googling and solved my problem. Thanks anyway (:
 
Old 09-05-2012, 07:48 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,360

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Good bash links
http://rute.2038bug.com/index.html.gz
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html
http://www.tldp.org/LDP/abs/html/
 
Old 09-05-2012, 09:36 PM   #6
Kallaste
Member
 
Registered: Nov 2011
Distribution: Slackware
Posts: 363

Rep: Reputation: 85
Quote:
Originally Posted by sbgirl54 View Post
Hey guys,

Also, how do you copy text from the konsole?
It depends on environment and configuration, but a standard way of copying and pasting is to just highlight the text (which copies it automatically), move your mouse to where you want to put it, and press the middle mouse button (or both mouse buttons simultaneously if don't have a middle one). You can also highlight the text (copying it), then press shift + insert to paste it. Or you can try ctrl-k and ctrl-u.
 
  


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
[SOLVED] environment variables and konsole in KDE? michaelinux Linux - Software 6 05-04-2011 01:13 AM
How could I set the title in the top of konsole terminal casualzone Linux - Newbie 4 04-13-2011 11:30 PM
Set background image for Konsole 2??? cweepy Linux - Newbie 2 09-08-2008 11:16 AM
howto set konsole table name[sles 10] edenCC SUSE / openSUSE 1 06-09-2007 08:36 PM
Cannot set LD_LIBRARY_PATH in .cshrc (able to set other env variables) senthilpr_in Linux - Newbie 4 02-26-2007 12:46 PM

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

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