Sponsored Content
Top Forums Shell Programming and Scripting building a SET clause in shell script Post 302113829 by shalua on Tuesday 10th of April 2007 02:13:37 PM
Old 04-10-2007
Thanks!! This will be a good learning for me. There are three things:

1. empno was a typo, so what you did is correct.
2. I don't want comma after the last line.
3. also if any attribute in the delimited string is in uppercase I would like to convert it into lower case.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

set password using a shell script

Hi All How can I set password in linux.It is OK if it display password in plain text in script. manually i can set: #passwd Changing password for root Enter new password: Bad password: too weak. Re-enter new password: Password changed. # I want this to be done by script.Please let me... (2 Replies)
Discussion started by: tannu
2 Replies

2. Shell Programming and Scripting

How do I set up a shell script using ifconfig?

I am running on AIX 5.3. I have a remote AIX server running on a generator. Many times the generator goes out and I only have a window of 15 mins with the network up and 30 mins the server is powered. I need help creating a script using ifconfig, where it goes out and checks the network every 5... (2 Replies)
Discussion started by: AIX25
2 Replies

3. Shell Programming and Scripting

How to set PATH using shell script [resolved]

Hi, Can anyone help me on how to set PATH using shell scripting.. Please find the shell script code here.... #!/bin/bash PATH = $PATH:/opt/app/oracle/product/10.2.0/bin export PATH echo $PATH exit When i execute this script i get the following error ./backup.sh: line 2: PATH:... (0 Replies)
Discussion started by: srinivasj
0 Replies

4. Shell Programming and Scripting

Bash-Shell: If-Clause to check if file is empty

Hello, I want to checkl whether my file has text in it or not. if ; then ... if ; then ... But none of these work Can someone help me? ---------- Post updated at 09:00 AM ---------- Previous update was at 08:55 AM ---------- The code-tags caused an displayerror,... (5 Replies)
Discussion started by: ABE2202
5 Replies

5. Shell Programming and Scripting

help with if clause in bash script

hey guys, I am trying to get some statistics from a DHCP server, like counting the number of DHCP Discovers from a specific MAC address. The script should count the number of DHCP Discovers and output it, otherwise if it cannot find any , it should output the MAC address and "0". The first... (10 Replies)
Discussion started by: liviusbr
10 Replies

6. Shell Programming and Scripting

$1 stays set after sourcing shell script.

ok, so I have a shell script that can be called using the first argument ($1) or not. This argument is a word (Tim for example) and not an actual flag (-x for example). If I call the script with an argument and call the same script without one, it believes that I provided an argument. Note here... (2 Replies)
Discussion started by: mrwatkin
2 Replies

7. Shell Programming and Scripting

Use a shell variable in where clause

Hi all, I want to use a variable inside my sql query and below is my script: #!/bin/ksh export b="abcd" a=`sqlplus -s abc/def@ghi <<++ set heading off; set feedback off; select xxx from mytable where clmn_nm='$b'; exit; ++` echo $a But the output i get is below: $>... (4 Replies)
Discussion started by: Jayaraman
4 Replies

8. Shell Programming and Scripting

Generating & executing the SELECT and UPDATE clause dynamically using shell script

Hi All, I need to write one shell script. The requirement is as follows. a) I am having list the employee names in a file stored in /tmp directory location as below /tmp/emp.txt b) and the contents are as below cat emp.txt ravi raj ram arun c) I need to connect to sybase... (1 Reply)
Discussion started by: Gowtham_giri
1 Replies

9. Shell Programming and Scripting

Help needed with shell script to search and replace a set of strings among the set of files

Hi, I am looking for a shell script which serves the below purpose. Please find below the algorithm for the same and any help on this would be highly appreciated. 1)set of strings need to be replaced among set of files(directory may contain different types of files) 2)It should search for... (10 Replies)
Discussion started by: Amulya
10 Replies
conv(3) 						     Library Functions Manual							   conv(3)

Name
       toupper, tolower, _toupper, _tolower, toascii - translate characters

Syntax
       #include <ctype.h>

       int toupper(c)
       int c;

       int tolower(c)
       int c;

       int _toupper(c)
       int c;

       int _tolower(c)
       int c;

       int toascii(c)
       int c;

Description
       The  functions  and  have  as their domain the range of the function. If the argument to represents a lowercase letter, the output from the
       function is the corresponding uppercase letter. If the argument to represents an uppercase letter, the result is the  corresponding  lower-
       case letter.

       The  case  of  c depends on the definition of the character in the language database. Because the case of a character can vary between lan-
       guage databases, the case of c depends on what language database is in use. Specifically, the case of arguments depends	on  what  property
       tables  are  associated the LC_CTYPE category.  Property tables are associated with the LC_CTYPE category by a successful call to the func-
       tion that includes the LC_CTYPE category. If no successful call to define LC_CTYPE has occurred or if the  character  case  information	is
       unavailable for the language in use, the rules of the ASCII coded character set determine the case of arguments.

       If  the	argument  to the function does not have the uppercase attribute, returns the argument unchanged.  Likewise, if the argument to the
       function does not have the lowercase attribute, returns it unchanged.

       The macros and have the same affect as and The difference is that the argument to the macros must be an ASCII character (that is, a charac-
       ter in the domain -1 to 127) and the argument must have the appropriate case.  Arguments to must have the uppercase attribute and arguments
       to must the lowercase attribute. The result of supplying arguments to these macros that are outside the domain or do not have the appropri-
       ate case is undefined.  These macros operate faster than the and functions.

       The  macro  converts its argument to the ASCII character set. The macro converts its argument by truncating the numerical representation of
       the argument so that it is between -1 and 127. You can use this macro when you move an application to a system other than an ULTRIX system.

   International Environment
       LC_CTYPE       If this environment variable is set and valid, uses the international language database named in the definition to determine
		      character classification rules.

See Also
       ctype(3int), setlocale(3), getc(3)

																	   conv(3)
All times are GMT -4. The time now is 11:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy