Programming :: Certain Book Search - Checking Of Case Insensitive

Jan 19, 2010

I am trying to do a search for the certain books, and I am trying to make it case insensitive. what I have come up with so far is this :

Code:
Database.txt
RETARDED MONKEY:RACHEAL ABRAHAML:30:30:20
GOLD:FATIN:23.20:12:3
StUPiD:JERLYN:20:40:3

Code:
echo -n "Title: "
read Title
echo -n "Author:"
read Author
echo ""
valuecheck='grep -i "$Title" Database.txt | grep -i "$Author" | awk -F":" '{ print $1}''
echo $valuecheck
if [ $Title = $valuecheck ] ; then
echo "HOHOHO"
else
echo "too bad"
fi

The issue which I am having is that, when it does the search for the correct row to be inputted into valuecheck, it will input the value as written in the database, which is in Uppercase. For this case, if I type in stupid for $Title and jerlyn for $Author, it searches the correct row, but the awk will print "STUPID" into the variable as that is what is written in the database. So how can I make my if statement case insensitive? Currently it reads like this:

Code:
if [ $Title = $valuecheck ] ; then
which means
if [stupid = StUPiD ] ; then

How can I make the if statement it case insensitive to allow it to display "HOHOHO"

View 5 Replies


ADVERTISEMENT

General :: Case Insensitive Search From Find Command?

Apr 29, 2011

I am not able to figure out how can I do case-insensitive search using the find command.

I tried

find . -name -i pattern

And it does not work.

View 2 Replies View Related

Programming :: Any Option To Make GCC Case Insensitive

Jul 11, 2010

I am working with a third party that use windows to compile. When we port that code I am running into a lot of case issues where the includes are not case sensitive. Is there any option in GCC to make it case insensitive. I know its a long shot, as I have done reading and does not seem so.

View 1 Replies View Related

Ubuntu :: Case Insensitive (Regex) CD For Script?

Oct 9, 2010

I know it's against the unix way and all that but I need a regex cd for a script to automatically move up an NTFS tree.

View 1 Replies View Related

General :: Windows - Make Rsync Case Insensitive

Mar 12, 2011

I'm rsync'ing a bunch of files between a Windows and a Linux system. Since not all Windows care about case, some of the files on the Windows system no longer have the same casing as they had on the Linux system. But rsync now treats these files as different and uploads a new copy.

Is it possible to have rsync ignore the case?

View 3 Replies View Related

Ubuntu Servers :: Any Way To Make Apache Case Insensitive?

Jan 10, 2011

Recently I've been migrating my development environment to ubuntu (desktop edition, because this is not a server, is just my computer) and I've been having some problems with apache case-sensitive (I'm an absolute beginner with it). I want to make apache case-insensitive, but I didn't find a complete and easy to follow solution online more than doing this:

From the command line, type sudo su to get root privileges.
nano /etc/apache2/mods-available/speling.conf
Type CheckSpelling on and hit ctrl-x, y to exit and save the file.
type a2enmod and then speling and hit enter.
type /etc/init.d/apache2 reload to reload apache.
Mistype a url to test it.

I found that here: [URL]. It worked for some things but I'm still having a lot of problems with capitalization. I don't wanna go back to windows an ISS. BTW I'm using ubuntu 10.10 desktop edition 32-bits, and I've not moved any apache configuration more than that described above.

View 3 Replies View Related

Fedora Servers :: TFTP Case Insensitive To File Name Requested

Jun 19, 2010

I am downloading some files via tftp from the server (call it my server) and I need the server to be case insensitive to the file names requested. That is If I request "SoMe.TTL" and the actual file name is "some.ttl" it should send "some.ttl" back! Right now it is case sensitive and is a pain in the but because some windows clients upload files to that directory and the names can have any case. Furthermore, the file request mechanism must allow the user to input the required file name, hence the user can write using any case. Can the tftp-server solve cases by it's own? How about dnsmasq's internal tftp server? Ok, maybe I wasn't explicit above:
I need to make the fedora tftpd-server Case Insensitive!

View 2 Replies View Related

Software :: How To Make Case Insensitive When Authz User On Subversion

Jul 1, 2010

I'm using Centos 5.4 and Subversion 1.4.2. I use MySQL to authz user when connect to SVN. In MySQL database, I have a username 'Harry', and in the file access control, I typed username 'harry'. Now I just can login with 'harry' user, cannot with 'Harry'. How can I check lower case on SVN before it requires authz, I tried to use AuthzForceUsernameCase Lower but apache cannot start.

This is my subversion.conf file
<Location />
DAV svn
SVNParentPath /svn
SVNListParentPath on
AuthType Basic
AuthName "Authorization Realm"
AuthzSVNAccessFile /var/svn/svnauth
AuthMYSQLEnable on
AuthMySQLHost mydomain
AuthMySQLUser username
AuthMySQLPassword password
AuthMySQLDB db
AuthMySQLUserTable user
AuthMySQLNameField userid
AuthMySQLPasswordField passwd
AuthMySQLPwEncryption md5
Require valid-user
</Location>

View 3 Replies View Related

Software :: Mount NTFS And VFAT Partitions And Make Them Case-insensitive?

Feb 16, 2010

Is there a way I can mount NTFS and VFAT partitions and make them case-insensitive? Somehow I installed Linux this time around and it's all case sensitive. Argh.

View 6 Replies View Related

Programming :: Perl Switch Statement Throwing Error Like Bad Case Statement (invalid Case Value)?

Oct 6, 2010

I've written a simple perl code to learn switches in perl.My code is pasted below,

#!/usr/bin/perl
$opt = 1;
switch($opt) {

[code]...

View 3 Replies View Related

Ubuntu :: Only Search For Similar Case Sensitive File Names?

Jan 22, 2010

Anybody know of a way to search only for similar case sensitive files? By which I mean doing a wildcard search across a drive & the only results are like: Abc.txt abc.txt VID_001.avi Vid_001.AVI .. etc.

I've already tried searching the forums & google but the closest I've found is regarding files with increasing numbers (music_001.mp3, music_002.mp3, etc), which doesn't quite fit with my issue, as they would be seen as different files on a case insensitive OS.

View 2 Replies View Related

OpenSUSE :: Kmail And Address Book Search Function

Jul 28, 2010

When I try to write email, and enter the first few letters of the recipient in the "to:" box, it sometimes but not always autocompletes. i.e., let's say my contact's name is Frederick, his address is e.g. robertsharry@snotmail.com. I enter Fred or fred or fre, a couple of addresses come in to the autocomplete drop-down, but not his. After searching all over over to find his address by other means, I start to write it in manually only to find that he IS in my address book (and also in recent addresses), listed under Freddie. I know that the word Freddie is not in his actual address, but what is the point of having a search function if you have to remember the address yourself? In other words surely the drop down search should show display names (as well as any other fields)?

View 5 Replies View Related

Programming :: Fortran 90 Code - Makefile Insensitive To Change

Mar 10, 2011

I am dealing with one FORTRAN 90 code, have made small changes.

milenko@milenkons:~/mt4$ make mt4
make: 'mt4' is up to date.
milenko@milenkons:~/mt4$ ifort -c MT2DDIB1.FOR
milenko@milenkons:~/mt4$ make mt4
make: 'mt4' is up to date.
milenko@milenkons:~/mt4$ make mt4
make: 'mt4' is up to date.
milenko@milenkons:~/mt4$ make mt4
make: 'mt4' is up to date.

I go for make command but it does not see that the source code has been modified.Than I do compilation from command line,try make again but no use.
F95=ifort
FFLAFGS= -O1

mt3: driver_mt2ddi.o constants.o settings.o params.o mt2dmod.o fdsystem.o mt2ddat.o mt2dsens.o
$(F95) -o $(FFLAGS) mt3 constants.o settings.o params.o mt2dmod.o fdsystem.o mt2ddat.o mt2dsens.o driver_mt2ddi.o
driver_mt2ddi.o: driver_mt2ddi.for constants.o settings.o params.o mt2dmod.o fdsystem.o mt2ddat.o mt2dsens.o
$(F95) -c $(FFLAGS) driver_mt2ddi.for

View 2 Replies View Related

Programming :: Headers From Richard Stevens Network Programming Book Not Installing

Oct 27, 2010

I am learning network programming via a book of Richard Stevens.The sample source codes are given here
http://www.unpbook.com/unpv13e.tar.gz
I downloaded and unzipped the file in /usr/src folder.As per the instructions given in README of downloaded archive I did.

View 5 Replies View Related

Slackware :: Mkisofs -iso-level 1 Converts To Lower Case Instead Of Upper Case?

Oct 28, 2010

Kernel 2.6, Slackware 12.0
mkisofs 2.01

I do 'mkisofs -iso-level 1 -o image John Smith.txt'. Only an example. When I mount image, ls outputs john_smi.txt. So it has shorten to 8.3 and translated ' ' into '_'. This is in accordance with the manual, although it doesn't say the conversion will be done.

Quote:

-iso-level level
.........................
With all iso9660 levels from 1..3, all filenames are restricted to upper case letters, numbers and the underscore (_).
...........................

However, as it did not reject the file name, it should have converted it to all upper case, it seems to me. And -iso-level 2|3 does the same thing.

Code:

root@darkstar:~# mkisofs -iso-level 1 -o image John Smith.txt
Total translation table size: 0
Total rockridge attributes bytes: 0
Total directory bytes: 0

[code]....

View 5 Replies View Related

Programming :: Book To Learn Programming In C ANSI?

Jul 11, 2011

What book you recommend to learn programming in C ANSI ?

View 1 Replies View Related

Programming :: Generic Case In C ?

May 14, 2010

As you know that GNU-C provides qsort() function in <cstdlib> in this prototype

Code:

You may know about Selection Sort Algorithm already, I want to write a function to perform Selection Sort but it can apply generally for many type: int, long, float, double... like qsort() above.

View 14 Replies View Related

Programming :: Setting No Case Sensitivity In As?

Jul 9, 2011

GNU assembler 2.17 (invoked as 'as').

Is there a way of setting no case sensitivity in as?

View 3 Replies View Related

Programming :: BASH - Regex In A Case Statement?

Jun 9, 2010

the following works and BASH doesn't complain, but VIM highlights the closing square bracket is if it sees a syntax error. Is there a better way to express regex in a case statement or is this an issue with VIM?

Code:
#!/bin/bash
case $1 in

[code]...

View 3 Replies View Related

Programming :: C# Control Cannot Fall Through From One Case Label To Another?

Feb 27, 2011

I'm having this problem with this piece of code, and i don't really get what the problem is, maybe is because i am already too sleepy to concentrate enough but maybe

switch(plazo){
case 1:
plazo = 12;

[code]....

View 3 Replies View Related

Programming :: Change Variable In Case Command?

Aug 7, 2010

I want to display 4 options using the case command and refresh the screen when options 1 and 2 are chosen (no changes to the options and you get asked again to chose option), but give a message for option 3 and exit on option 4. I set this up with the script below, but choosing option 1 works and choosing option 2 exits the script.

Code:

#!/bin/bash
#testing options
Option="0"

[code]....

View 7 Replies View Related

Programming :: Escape '*' In Case Statement Bash

Jan 23, 2010

Does it possible to escape * in the case statement

Code:

View 2 Replies View Related

Programming :: Book Recommendation For C++ GUI Programming?

Apr 13, 2011

I am not new to PC programming. I have been able to write C++ console programs. They are not too hard to write.Now, I want to move up to the Linux C++ Graphical User Interface (GUI) programming.Can an experienced member of the Linux community recommend a good reference book for programming the GUI windows?

View 14 Replies View Related

Programming :: Get Different Result Of Matrix Op On Hw Rtw Book?

Jul 31, 2011

Dear Linux/c++/g++ programmers: the run result on my system, ubuntuLinux10.04(kernel2.6.35-25), gcc4.5.2 is not what book predict

source code
http://examples.oreilly.com/9780596007614/
11-28
11-29
11-24
#include "matrix.hpp"

[Code]...

View 13 Replies View Related

Programming :: Change To Lower Case And Concatenate The First And Last Names?

Nov 28, 2010

I have a file like below. For all the lines (except for the ones listed as 'Unknown Owner' and N/A') I would like to change to lower case and concatenate the first and last names.Before:

Code:
aaa.bbb.ccc.ddd,Unknown Owner
ddd.eee.fff.ggg,N/A
hhh.iii.jjj.kkk,John Doe
aaa.bbb.ccc.ddd,Mary Jane

[Code]...

View 4 Replies View Related

Programming :: Case Statement Passing Multiple Arguments?

Aug 7, 2010

I've started dabbling with the case statement in order to pass some option's arguments into variables. I do not think I am doing this right.

Code:

usage() {
echo "Usage: $0 [-z|--snooze] [-c|--channel] [-p|--playlist]
[-m|--message] [-v|--mpcvolume]"

[code]....

As you can see, I want to pass arguments depending on the option(s) chosen by the user; ie. --snooze, or --channel. By default, if no options are chosen, I'll display a usage message; though in the future I'll provide some sane defaults. I'd like to create a case statement to handle passing arguments to any number of options; something like:

Code:

wakethehellup.sh --snooze 20 --message 'wake up!'

and for the other arguments, it would have a default set. The case statement I provided fails with a syntax error "syntax error near unexpected token `$2'" near the '--snooze' in the statement, so I take it you can't pass a parameter in this way; but I'm confused as to how I'm supposed to pass different parameters to different options without the options being confused as parameters.

View 2 Replies View Related

Programming :: Do Not Miss Any Cases While Making The Test Case Doc?

Jul 28, 2010

Few months back I learnt a *few* concepts about bits/bytes and started writing a program for bit packing in C++. Now that program has grown upto 600 lines and I am still working on it. Yesterday I realized I missed some special cases due to which the program was malfunctioning. Now I have modified the program and it is working properly but I think If I would have designed all the possible test cases before writing the code, I would have finished the program long ago.

I. What is proper way to design the test cases before coding?

II. How should I make sure that I do not miss any cases while making the test case doc. ?

III. Does writing test cases prior to coding solve messy code issues or should I consider something else ?

View 8 Replies View Related

Programming :: Ignore Case In If Statement Shell Scripting

Feb 3, 2010

How do i make my strings case-insensitive while comparing them with an if statement?

View 2 Replies View Related

Programming :: No Debugging Symbols Found (not The Simple Case)?

Jan 6, 2011

I wasn't sure where to put this so if I need to move it just let me know.I have a strange problem that I cannot figure out. When I use gdb to debug our rpm-installed program, it says (no debugging symbols found) when it loads. Thing is, when I use nm on the program it can print the symbols, and even stranger is if I use gdb on the program before it is packed up by rpmbuild it loads the debug symbols just fine.Our program is built via the standard make using:GS=-g -Wall-pedantic and as I mentioned I can debug the resulting program. After the build, I package it up using:

cmd="rpmbuild -v -bb ptsnmp.spec --define "ver ${cmvc_release}" --define "rel ${cmvc_level}" --define "_topdir $rpmdir""When this package is installed via rpm, the binary on the machine shows all the debug info via nm, file shows it is not stripped:pt_snmp: ELF 64-bit LSB executable, AMD x86-64, version 1 (SYSV), for GNU/Linux 2.6.9, dynamically linked (uses shared libs), for GNU/Linux 2.6.9, not strippedyet when I try to debug it I get the no debugging symbols found.This is really taxing my brain and I am sure I am just missing something

View 4 Replies View Related

Programming :: The Perfect Javascript Tutorial Or Book?

Jul 30, 2011

I'm looking for javascript tutorials or books that meets the following criteria:

1. Very thorough: Starts with the most fundamental concepts and progresses logically from basic to advanced concepts, without skipping over important ideas for the sake of expediency.

2. Lots of small practice exercises that parallel the concepts and syntax being learned.

I've looked at a lot of tutorials, but they all tend to be lacking in one of these areas or the other.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved