Sponsored Content
Top Forums Shell Programming and Scripting Uppercase to lowercase and vice versa Post 302508170 by fpmurphy on Saturday 26th of March 2011 09:52:24 AM
Old 03-26-2011
Code:
#!/bin/ksh

if [[ $# != 1 ]]; then
   echo "Usage $0 [string]"
   exit 1
fi

instr=$1
typeset -u ustr=$1
typeset -l lstr=$1

echo "IN: $instr  UPPER: $ustr  LOWER: $lstr"

exit 0

 

9 More Discussions You Might Find Interesting

1. Programming

binary to string conversion and vice versa

please let me know that in unix using c programming language we can do binary to string conversion and vice versa using ltoa and atol but how can we do it in c++ programming language. thank you in advance. (3 Replies)
Discussion started by: kinnaree
3 Replies

2. Shell Programming and Scripting

sed help to convert from lowercase to uppercase and vice versa!

Hello, can sed be used to convert all letters of a file from uppercase to lowercase and vice versa?i know tr command can be used but with sed is it possible? i came up with this :- sed 'y///' file1 actually the above command is also not working! Please help me. Thanks in advance :) (6 Replies)
Discussion started by: salman4u
6 Replies

3. Shell Programming and Scripting

Pdf to text conversion and vice versa

Hi, I have a pdf file. i want to convert it to text file and do some work on it and later want to convert it back to pdf. Can this be done via unix? or Is there a way unix can directly work on PDF file? (2 Replies)
Discussion started by: saltysumi
2 Replies

4. UNIX for Dummies Questions & Answers

Appending from a file to a script and vice versa

Hi, I am new to Unix and discovered this example problem online that I believe will help my learning: Run the command's below env >> xx env >> xx env >> xx env >> xx env >> xx You will now have a file called XX with the env redirected into it 5 times Create a script named... (2 Replies)
Discussion started by: Jimmy_c
2 Replies

5. Ubuntu

What is the advantage of ubuntu over vista and vice versa?

i am thinking of replacing my vista with ubuntu. Questions: 1) what will be the advantages and disadvantages of using ubuntu instead of vista? 2) what will be the setbacks of replacing my vista? 3) how hard is it to cope up with the new OS? what must i learn to utilize ubuntu? (1 Reply)
Discussion started by: Anna Hussie
1 Replies

6. UNIX for Dummies Questions & Answers

Problem with scp from one server to the other (but not vice versa)

Hi I have a system PRIMARY where I can push or pull files to/from STANDBY using scp. I can also ssh without entering a password. On the STANDBY system if I try and use scp or ssh it asks for a password. I checked in ~/.ssh and there was no authorized_keys file on the PRIMARY server. After... (2 Replies)
Discussion started by: mrrossi
2 Replies

7. Shell Programming and Scripting

Converting from Centigrade to Fahrenheit and vice versa.

I need to write a script that will take the input from a file and convert the number from centigrade to fahrenheit and vice versa. This is what I have but it doesn't seem to be correct. Also the data file has 11 numbers inside of it and the output needs to be listed as so: Fahrenheit Temperature... (18 Replies)
Discussion started by: N1ckNak
18 Replies

8. UNIX for Dummies Questions & Answers

How to ping from Windows to Solaris 10 and vice versa?

Hi all, I installed Oracle virtual box 4.1.8 on my desktop. I installed Windows 2008 server R2 as one instance and Solaris 10 as another instance. When am trying to ping from Windows to solaris and vice-versa, ping not working. windows IP : 10.1.47.24 Solaris IP : 10.1.47.25 netstat... (2 Replies)
Discussion started by: kjks
2 Replies

9. UNIX for Dummies Questions & Answers

Command for Host Name to IP Address or Vice Versa

Hi, In unix or linux is there any command exist to identify Host Name to IP Address or Vice Versa? Thanks in advance (6 Replies)
Discussion started by: nag_sathi
6 Replies
ustr(1) 						    Ustr String Library, tools							   ustr(1)

NAME
ustr-import - ustr string library import tool SYNOPSIS
ustr-import [--32|--64] [-d][d] [-c] [-b x] [-e 1|0] [-s 1|0] section DESCRIPTION
This tool lets you use the Ustr string library without incuring dependencies on the library itself, so API/ABI compatibility is 100% (nothing changes unless you do it) and installing your application doesn't require the library to be pre-installed. OPTIONS
--32 If you installed with multilib, this runs the 32 bit variant (and installs the variable multilib build code as ustr-conf.h). --64 If you installed with multilib, this runs the 64 bit variant (and installs the variable multilib build code as ustr-conf.h). -d Turn debugging on, USTR_ASSERT() now runs code etc. -d Turn extra debugging on, including End of String (EOS) markers that takeup space. Note that you can do -dd to add both at once. -c Use C files, this requires that you alter the build system to compile the C files and link them into your application. The default is to just provide headers that you can just include. -b Specify the default reference count byte size: 0, 1, 2 or 4 (or 8 on 64 bit platforms). Note that 2 bytes is the minimum if you have explicit size storage. -e Specify the default exact sized allocations flag, without this flag allocations are rounded up to the neared half power of two. -s Specify the default explicit size storage flag, without this flag allocations have an implicit size based on their length with it a size value is stored with the string (thus taking significantly larger space for small strings, but this doesn't require reallocating the string when growing and shrinking the string). Note that turning this on also increases the minimum sizes for length and reference count storage. SECTIONS
all All of the following sections are included. b Working with binary numbers in NBO format. cmp Comparing, strcmp() for Ustr's, although the Ustr versions are safer and much faster. cntl Control options dynamically. fmt Formatted output, sprintf() for Ustr's. gdb Copy just the .gdbinit file to the local dir. io Input Output. ins Inserting data. main The core functions, including strcat(), strdup() and delete for Ustr's. Always safer and often much faster. parse Parsing integers, Ie. Nice versions of strtol(). pool A bundled memory pool API, to use with the ustrp functions. replace Replacing all occurances of data. sc Shortcut functions for Ustr's. set Setting data, strcpy() for Ustr's. split Slit the data, strtok() / strsep() for Ustr's. spn Spanning, strspn() / strcspn() for Ustr's. srch Searching, strchr() / strrchr() / strstr() for Ustr's, although the Ustr versions are safer and much faster. sub Substituting data. utf8 Working with UTF8. FILES
/ustr/include/ustr-conf.h /ustr/include/ustr-conf-debug.h In multilib. this is the header to choose the correct conf.h header based on the byte size. /ustr/include/ustr*.h The default "extern" header files. /usr/share/ustr-*/ustr-*-internal.h Internal functions, used the implement the public interfaces. /usr/share/ustr-*/ustr-*-code.h The code behind the public interfaces. /usr/share/ustr-*/ustr-*-code.c The C files, which use the code header files to create objects. /usr/share/ustr-*/.gdbinit The GDB init file containing macros to help inspect Ustr's in the debugger. SEE ALSO
ustr(3),ustr_const(3) ustr-import 1.0.4 03-Aug-2007 ustr(1)
All times are GMT -4. The time now is 08:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy