Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Help on creating and saving an alias Post 302781053 by grep_me on Friday 15th of March 2013 12:21:23 PM
Old 03-15-2013
Rather than an alias, create a function for this (this is in korn shell)
k() { str="$1"; pth="$2; grep -i $str $pth ; }
 

10 More Discussions You Might Find Interesting

1. IP Networking

ifconfig: difference between creating logical or alias network interface

Hi guys, I have set up multiple virtual FTP servers on a server through one physical NIC. I believe there are to ways; setting logical or alias ip's. I would like to know what is the difference between setting up a logical ip or setting up an alias ip to a physical network interface? Some links to... (5 Replies)
Discussion started by: zaff
5 Replies

2. UNIX for Dummies Questions & Answers

Creating alias for directory path

I am trying to create an alias for a frequently used directory path by using alias xyz="/proj/dir_name" and then trying to reach a sub-directoy by using cd xyz/abc but I get an error saying " No such file or directory " plz tell me wats wrong with this ... (3 Replies)
Discussion started by: jasjot31
3 Replies

3. Shell Programming and Scripting

help needed with creating challenging bash script with creating directories

Hi, Can someone help me with creating a bash shell script. I need to create a script that gets a positive number n as an argument. The script must create n directories in the current directory with names like map_1, map_2 etcetera. Each directory must be contained within its predecessor. So... (7 Replies)
Discussion started by: I-1
7 Replies

4. Red Hat

Live-cd Saving changes

Hi all, firstly apologies if this is in the wrong category. I have been making livecds (fedora based) and to change eg the background i use below in the ks file. this works fine, however when i install the livecd it loses the changes. How can i make the changes so that they stay when... (5 Replies)
Discussion started by: davewilks
5 Replies

5. Solaris

Creating Alias for FILE

Hello, I need the command to create alias for a file "FILE" (NOT for commands) ? And Is there any difference between creating alias for files and creating alias for commands ? For info, i'm using Solaris 8 Thx, http://www.unix.com/images/misc/progress.gif (5 Replies)
Discussion started by: newpromo
5 Replies

6. UNIX for Dummies Questions & Answers

Create alias files (not alias commands)

If one: $ find -name 'some expression' -type f > newfile and then subsequently wants to create an alias file from each pathname the find command retrieved and the > placed within 'newfile', how would one do this? Ideally, the newly created alias files would all be in one directory. I am... (3 Replies)
Discussion started by: Alexander4444
3 Replies

7. Solaris

Saving to usb

Greetings. I am trying to save a file to a usb from solaris 10. If I do rmformat, I see my usb, but can't find a location to tell things to save to or figure out how to save/view the files on the disk. Any help/thoughts/etc would be appreciated. Thanks! ~K (20 Replies)
Discussion started by: kuriosity_prime
20 Replies

8. Shell Programming and Scripting

Creating .../ alias in bash

I want to create an alias as follows but is not working alias ../='cd ../' (3 Replies)
Discussion started by: kristinu
3 Replies

9. Homework & Coursework Questions

Creating a .profile, displaying system variables, and creating an alias

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Here is what I am supposed to do, word for word from my assignment page: 1. Create/modify and print a... (2 Replies)
Discussion started by: Jagst3r21
2 Replies

10. OS X (Apple)

Having trouble creating an alias for grep

Hi, I'm using Mac 10.9.1. I would like to create an alias for grep so that it won't print out messages like "grep: /Users/davea/workspace/myproject/subdir/: Is a directory" all the time. So in my terminal, I opened ~/.profile and entered alias grep='grep -s' However, when I close and... (5 Replies)
Discussion started by: laredotornado
5 Replies
MB_CONVERT_CASE(3)							 1							MB_CONVERT_CASE(3)

mb_convert_case - Perform case folding on a string

SYNOPSIS
string mb_convert_case (string $str, int $mode, [string $encoding = mb_internal_encoding()]) DESCRIPTION
Performs case folding on a string, converted in the way specified by $mode. PARAMETERS
o $str - The string being converted. o $mode - The mode of the conversion. It can be one of MB_CASE_UPPER, MB_CASE_LOWER, or MB_CASE_TITLE. o $encoding -The $encoding parameter is the character encoding. If it is omitted, the internal character encoding value will be used. RETURN VALUES
A case folded version of $string converted in the way specified by $mode. UNICODE
By contrast to the standard case folding functions such as strtolower(3) and strtoupper(3), case folding is performed on the basis of the Unicode character properties. Thus the behaviour of this function is not affected by locale settings and it can convert any characters that have 'alphabetic' property, such as A-umlaut (A). For more information about the Unicode properties, please see http://www.unicode.org/unicode/reports/tr21/. EXAMPLES
Example #1 mb_convert_case(3) example <?php $str = "mary had a Little lamb and she loved it so"; $str = mb_convert_case($str, MB_CASE_UPPER, "UTF-8"); echo $str; // Prints MARY HAD A LITTLE LAMB AND SHE LOVED IT SO $str = mb_convert_case($str, MB_CASE_TITLE, "UTF-8"); echo $str; // Prints Mary Had A Little Lamb And She Loved It So ?> Example #2 mb_convert_case(3) example with non-Latin UTF-8 text <?php $str = "Txiotn a nE Baos unuvn yn, dpaokeCei unp vw0po kuvs"; $str = mb_convert_case($_tr, MB_CASE_UP_ER, "UTF_8"); _ _ echo $str; // Prints TXI>TH A/TTHH BAO> YHMNH | H, /PA>KE/EI YTTP NOOPO KYN> $str = mb_convert_case($str, MB_CASE_TITLE, "U_F-8"); echo $str; // Prints Txiotn A nE Baoo Ynuvn | n, /paokeCei Ynp Nw0po Kuvo ?> SEE ALSO
mb_strtolower(3), mb_strtoupper(3), strtolower(3), strtoupper(3), ucfirst(3), ucwords(3). PHP Documentation Group MB_CONVERT_CASE(3)
All times are GMT -4. The time now is 04:47 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy