LinuxQuestions.org
Register a domain and help support LQ
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, 10: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, 10:08 AM   #2
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian i686 (solaris)
Posts: 8,104

Rep: Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267Reputation: 2267
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, 12:22 PM   #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, 12:33 PM   #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, 08:48 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
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, 10:36 PM   #6
Kallaste
Member
 
Registered: Nov 2011
Distribution: Slackware
Posts: 347

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


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


All times are GMT -5. The time now is 02:19 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration