It has been quite a while since I used UNIX. I am developing
a security system and I was wondering if UNIX and/or LINUX
user ID's are case-sensitive.
i.e. can user 'daveb' and 'Daveb' exist on the same system with
completely different authorizations/priorities, etc.? (3 Replies)
I tried looking for the answer online and came up with only a few semi-answers as to why file and directory names are case sensitive in Unix. Right off the bat, I'll say this doesn't bother me. But I run into tons of Windows and OpenVMS admins in my day job who go batty when they have to deal... (3 Replies)
Friends,
I was asked to work on Clear Case after setting up.
For this created a dynamic view by using the command, 'cleartool mkview -tag <view name> -stgloc viewstg'.
Now I am not sure how to proceed further :-( May I request you to help me out in continuing further. I have a deadline in... (1 Reply)
HELLO ALL,
URGENTLY NEEDED A SCRIPT TO SELECT AND DELETE LOWER AND MIXED CASE RECORDS FROM A COLUMN IN A TABLE.
FOR EXAMPLE : Table name is EMPLOYEE and the column name is CITY
and the CITY column records will be: Newyork
washington
... (1 Reply)
Hi,
In below code, i am expecting the output has
Bye
Bye
But i am getting has
Bye
Hi
Code:
#!/usr/bin/bash
var="Hi"
cat txt.txt | while read var1
do
next="Bye"
case $var in
Hi) (1 Reply)
Hi
I wanted to know if we can write a nested case in UNIX script.
Something like following -
Case ${sDB} in
Srvr1)
case ${sSchema}
Sch1)
DBusr=Username1
DBPwd=Pwd1
;;
Sch2)
DBusr=Username2
... (1 Reply)
Hi All
I have a script which extracts values from a Database (A persons name) and puts it into a variable in my script IE: $NAME
However the Value in the DB is all in uppercase and contains the users first name and last name
EG:
> echo $NAME
GRAHAM BOYLE
>
What I need is only the... (7 Replies)
Hi,
I am New to Unix Shell Scripting basically, i need some help in achieving a case statement in Shell script to call recursively That is if case having like 1 2 3 4 options , if user inputs 1 and gets executed case should ask for options again but user should not input the same input value 1,... (7 Replies)
have written the below code to check whether the string received from user is a file name or dir using case statement, but its going into default case*).
#!/bin/sh
#Get a string from user and check whether its a existing filename or not
rm str2
rm str3
echo "enter a file \c"
read fil... (8 Replies)
Discussion started by: Mohan0509
8 Replies
LEARN ABOUT OSF1
strncasecmp
strcasecmp(3) Library Functions Manual strcasecmp(3)NAME
strcasecmp, strncasecmp - Perform case-insensitive string comparisons
LIBRARY
Standard C Library (libc.so, libc.a)
SYNOPSIS
#include <strings.h>
int strcasecmp(
const char *s1,
const char *s2
int strncasecmp(
const char *s1,
const char *s2
size_t n;
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
strcasecmp(), strncasecmp(): XPG4-UNIX
Refer to the standards(5) reference page for more information about industry standards and associated tags.
PARAMETERS
Points to a location containing first string. Points to a location containing the second of two strings referenced. Specifies the maximum
number of bytes to compare.
DESCRIPTION
The strcasecmp() function compares the string pointed to by the s1 parameter to the string pointed to by the s2 parameter, while ignoring
differences in case. The strncasecmp() function is similar to the strcasecmp function, but also compares size. If the size specified by n
is reached before a null, the comparison stops. Note that these functions work for 7-bit ASCII compares only and should not be used in
internationalized applications.
RETURN VALUES
Upon completion, the strcasecmp() function returns an integer whose value is greater than, equal to, or less than 0 (zero), according to
whether the s1 string, ignoring case, is greater than, equal to, or less than the s2 string.
Upon successful completion, the strncasecmp() function returns an integer whose value is greater than, equal to, or less than 0 (zero),
according to whether the s1 array (possibly null-terminated), ignoring case, is greater than, equal to, or less than the s2 string (possi-
bly null-terminated).
RELATED INFORMATION
Functions: string(3), strcat(3), strcmp(3), strcpy(3)
Standards: standards(5) delim off
strcasecmp(3)