Simple to you not simple to me pattern matchin help


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Simple to you not simple to me pattern matchin help
# 1  
Old 07-22-2007
Question Simple to you not simple to me pattern matchin help

hey all, im new and my first question is:

say i have a word "blahblah"

how do i get and replace the last letter of the word with say k, so replace the h with a k.

However you cant just replace the h it has to change the LAST LETTER of the word.

Cheers In advance.
Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Syslog.conf: looking for a simple answer on a simple question

Cheers! In /etc/syslog.conf, if an error type is not specified, is it logged anywhere (most preferable is it logged to /var/log/messages) or not? To be more precise I am interested in error and critical level messages. At default these errors are not specified in syslog.conf, and I need to... (6 Replies)
Discussion started by: dr1zzt3r
6 Replies

2. Shell Programming and Scripting

Help making simple perl or bash script to create a simple matrix

Hello all! This is my first post and I'm very new to programming. I would like help creating a simple perl or bash script that I will be using in my work as a junior bioinformatician. Essentially, I would like to take a tab-delimted or .csv text with 3 columns and write them to a "3D" matrix: ... (16 Replies)
Discussion started by: torchij
16 Replies

3. Shell Programming and Scripting

Simple Pattern Match

Hello ! Experts, I saw a ton of postings here about Awk pattern matching and even after going through all of it, what I have concocted isnt working for me. Here is what I am after. I have a huge set of csv files and in the fifth column, I have text like this --- ANFD10239CS9 BCDD93948CS9... (5 Replies)
Discussion started by: PG3
5 Replies

4. Shell Programming and Scripting

Pattern Matchin Huge File

Hi Experts, I've issue with the huge file. My requirement is I need to search a pattern between the 155-156 position and if its match's to 31 or 36 then need to route that to a new separate files. The main file has around 1459328 line and 2 GB in size. I tired with the below code which take... (9 Replies)
Discussion started by: senthil.ak
9 Replies

5. Shell Programming and Scripting

Awk -simple pattern matching

Find bumblebee and Megatron patterns (input2) in input1. If it is + read input1 patterns from Left to Right if it is - read input1 patterns from Right to Left Y= any letter (A/B/C/D) input1 c1 100 120 TF01_X1 + AABDDAAABDDBCADBDABC c2 100 120 TF02_X2 - AABDDAAABDDBCBACDBBC... (2 Replies)
Discussion started by: bumblebee_2010
2 Replies

6. UNIX for Dummies Questions & Answers

Simple search pattern help

Hi I need to define a pattern that will match an open square bracket, a series of numbers fro 1 to 4 digits in length and a close square bracket. Examples of the numbers I will need to find are: or or or I am using BBEdit to search, and BBEdit uses the standard GREP search... (1 Reply)
Discussion started by: alisamii
1 Replies

7. UNIX for Dummies Questions & Answers

Pattern matchin Between Two Files

Hi All, I have two files as below: file1 file2 AAAA CCCC,1234,0909 BBBBB AAAA,1234 AAAA DDDD,23536,9090 CCCC DDDD EEEEE I want a out file as below AAAA,1234 BBBB AAAA,1234... (5 Replies)
Discussion started by: thana
5 Replies

8. Shell Programming and Scripting

OS differences in simple pattern match

Hi folksSorry if code tags don't work out correctly but this PC does not have Java setup correctly to allow me to put them inproperly.I have a simple string pattern match behaving differntly on AIX and Solaris 10 and I don't understand why or what to do about it.This simple test: -) ]] && echo... (4 Replies)
Discussion started by: steadyonabix
4 Replies

9. Shell Programming and Scripting

Simple egrep pattern

I'm new to egrep. What pattern could I use to find all lines that match this pattern: <beginning of line><any amount of whitespace>sub<space>. I want it to return the entire line. (I'm trying to generate a list of all Perl sub definitions in a list of Perl modules.) Thanks for your help! (7 Replies)
Discussion started by: blondie53403
7 Replies

10. UNIX for Dummies Questions & Answers

Ok simple question for simple knowledge...

Ok what is BSD exactly? I know its a type of open source but what is it exactly? (1 Reply)
Discussion started by: Corrail
1 Replies
Login or Register to Ask a Question
REPLACE(1)						       MySQL Database System							REPLACE(1)

NAME
replace - a string-replacement utility SYNOPSIS
replace arguments DESCRIPTION
The replace utility program changes strings in place in files or on the standard input. Invoke replace in one of the following ways: shell> replace from to [from to] ... -- file_name [file_name] ... shell> replace from to [from to] ... < file_name from represents a string to look for and to represents its replacement. There can be one or more pairs of strings. Use the -- option to indicate where the string-replacement list ends and the file names begin. In this case, any file named on the command line is modified in place, so you may want to make a copy of the original before converting it. replace prints a message indicating which of the input files it actually modifies. If the -- option is not given, replace reads the standard input and writes to the standard output. replace uses a finite state machine to match longer strings first. It can be used to swap strings. For example, the following command swaps a and b in the given files, file1 and file2: shell> replace a b b a -- file1 file2 ... The replace program is used by msql2mysql. See msql2mysql(1). replace supports the following options. o -?, -I Display a help message and exit. o -#debug_options Enable debugging. o -s Silent mode. Print less information what the program does. o -v Verbose mode. Print more information about what the program does. o -V Display version information and exit. COPYRIGHT
Copyright (C) 1997, 2014, Oracle and/or its affiliates. All rights reserved. This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. SEE ALSO
For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online at http://dev.mysql.com/doc/. AUTHOR
Oracle Corporation (http://dev.mysql.com/). MySQL 5.5 01/30/2014 REPLACE(1)