Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google site



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Closed Thread
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-15-2002
Registered User
 

Join Date: Apr 2002
Location: india
Posts: 6
Unhappy character conversion

how do i convert lower case characters entered via user through screen into upper case and vice-versa in Cshell.

is there a function available for this
Sponsored Links
  #2 (permalink)  
Old 04-15-2002
PxT's Avatar
PxT PxT is offline Forum Advisor  
Registered User
 

Join Date: Oct 2000
Location: Sacramento, CA
Posts: 909
I do not know of a way to do it in C-shell. [t]csh is generally considered a poor choice for scripting purposes. See this article by Tom Christiansen. In bash or ksh you can uppercase a variable by using "typeset -u" and lowercase it using "typeset -l".
  #3 (permalink)  
Old 04-15-2002
Perderabo's Avatar
Unix Daemon
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,150
I agree that the OP should switch to a better shell. However...
Code:
#! /usr/bin/csh

echo enter string 
set x=$<

set x=`echo "$x" | \
        tr abcdefghijklmnopqrstuvwxyz  ABCDEFGHIJKLMNOPQRSTUVWXYZ`

echo x = $x
exit 0

should switch lower case to upper case.
  #4 (permalink)  
Old 04-16-2002
Registered User
 

Join Date: Apr 2002
Location: india
Posts: 6
actually we need to have GOTO in the script and this command
(GOTO) IS ONLY AVAILABLE IN cshell



SUNIL
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Can I read a file character by character? murtaza Shell Programming and Scripting 4 04-27-2009 06:51 AM
Korn: How to loop through a string character by character shew01 Shell Programming and Scripting 10 12-02-2008 07:58 AM
read a variable character by character, substitute characters with something else vipervenom25 UNIX for Dummies Questions & Answers 2 06-06-2008 04:18 PM
Can i read a file character by character karnan Shell Programming and Scripting 6 05-19-2008 03:22 AM
character set conversion in unix C gucho Programming 1 03-01-2008 08:27 AM



All times are GMT -4. The time now is 12:42 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0