LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 01-31-2005, 04:58 PM   #1
XST1
LQ Newbie
 
Registered: Feb 2004
Posts: 11

Rep: Reputation: 0
typeset not working


I cant get typeset working for some reason.... heres my script:

Code:
#!/bin/bash

for parameterList in $*
do
	typeset -u parameterList
	echo $parameterList
done

heres the warning I get:

typeset: usage: typeset [-afFirtx] [-p] name[=value] ...

-u should be an argument of typeset (-u is used to turn a string to uppercase and -l should turn a string to lowercase)
 
Old 02-01-2005, 09:06 AM   #2
bigearsbilly
Senior Member
 
Registered: Mar 2004
Location: england
Distribution: Debian, Mint, Puppy, Raspbian
Posts: 3,433

Rep: Reputation: 203Reputation: 203Reputation: 203
your version of bash doesn't support it.
(If it does at all)

Try using the korn shell instead.

#!/bin/ksh
 
Old 02-01-2005, 09:26 AM   #3
dustu76
Member
 
Registered: Sep 2004
Distribution: OpenSuSe
Posts: 153

Rep: Reputation: 30
I'm not sure -u option works in bash. Works in ksh though.

HTH.
 
Old 02-07-2005, 12:29 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.10, Centos 7.5
Posts: 17,565

Rep: Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425Reputation: 2425
According to this: http://www.tldp.org/LDP/abs/html/declareref.html,
bash typeset only accepts riafx options.
 
  


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
Typeset issues Asadullah Rathore Linux - General 1 09-24-2005 01:07 PM
typeset issues in ksh talalrabbani Linux - Distributions 0 09-23-2005 01:13 AM
F3-F10 is not working when F13-F20 is working in redht-8. haivinay Linux - General 0 09-20-2004 07:39 AM
Link/Applet not working in all Linux browsers, but working in IE MasterPatricko Linux - Software 6 09-04-2004 04:39 AM
cannot download files in mozilla -save dialog not working, galeon not working cmisip Linux - General 0 08-03-2003 04:25 PM

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

All times are GMT -5. The time now is 07:37 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration