10-27-2011
Replacing a string in an entire mysql Database
Hi,
Can someone please tell me how I can replace every occurrence of a string with another string, in the entire mysql database?
What this means is, i just dont want to operate table by table. I want to search the database and automatically replace the string /opt/cacti/scripts/ with /apps/cacti/scripts.
thanks
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
How to connect a MySQL database from unix using unix shell scripting ( people are using perl scrpt to connect the same database).
I want to access a MySQL database through a shell script (4 Replies)
Discussion started by: apsprabhu
4 Replies
2. Shell Programming and Scripting
Hi All,
Thanks in Advance!!
How to backup a particular Databases..through Bash script!!
For example i have 6 databases;
Anish
linux
Software
Questions
Rhce
Google
these are the databases i have from that i want to take "Anish" and "questions" database backup regularly.... (4 Replies)
Discussion started by: anishkumarv
4 Replies
3. Web Development
so when i issue a command like the below:
# mysql --pager=/usr/bin/less -u cactiman -p -e 'select * from data_input' cacti
Enter password: ... (2 Replies)
Discussion started by: SkySmart
2 Replies
4. Shell Programming and Scripting
Dear All,
Can I make Mailx to read recipient address from a mysql database?
I already tried emailing with bash script:
SUBJECT="TEST"
export EMAIL_ADDRESS=`mysql -uroot -pabcde smsd -e "SELECT email FROM recipient"`
mysql -uroot -pabcde smsd -e "SELECT ID, SenderName, Body FROM inbox" |... (14 Replies)
Discussion started by: jazzyzha
14 Replies
5. Shell Programming and Scripting
I have a configuration file namely: abcd, that will be use for some service (like gammu)
Inside that configuration file:
number1 = 66673527
number1 = 8373272
How can I make the file to search the number1 and number2 from a mysql database?
Any help will be very appreciated. Thanks (1 Reply)
Discussion started by: jazzyzha
1 Replies
6. Web Development
Hi team,
How can I implement a users in MySQL database for Apache users, assuming that I'm using RHEL6. That is to say, how can I design this database and how let's Apache server know those user in this database.
Thanks in advance.. (3 Replies)
Discussion started by: leo_ultra_leo
3 Replies
7. Shell Programming and Scripting
Greetings.
I've got a csv file with data along these lines:
Spumoni's Pizza Place, Placemats n Things, Just Lamps
Counterfeit Dollars by Vinnie, Just Shades, Dollar StoreI want to replace the entire comma-delimited field if it matches something ending in "Place" or beginning with "Dollar",... (2 Replies)
Discussion started by: palmfrond
2 Replies
8. UNIX for Beginners Questions & Answers
I want to search a small string in a large string and find the locations of the string. For this I used grep "string" -ob <file name where the large string is stored>. Now this gives me the locations of that string. Now how do I store these locations in a text file.
Please use CODE tags as... (7 Replies)
Discussion started by: ANKIT ROY
7 Replies
LEARN ABOUT HPUX
xtaugmenttranslations
XtAugmentTranslations() XtAugmentTranslations()
Name
XtAugmentTranslations - nondestructively merge new translations with widget's existing ones.
Synopsis
void XtAugmentTranslations(w, translations)
Widget w;
XtTranslations translations;
Inputs
w Specifies the widget into which the new translations are to be merged. Must be of class Core or any subclass thereof.
translations
Specifies the compiled translation table to merge in.
Description
XtAugmentTranslations() merges a compiled translation table translations into a widget's internal compiled translation table, ignoring any
new translations that conflict with existing translations. The table translations is not altered by this process. Any "#replace", "#aug-
ment", or "#override" directives in translations are ignored by this function.
Usage
Use XtParseTranslationTable() to convert a string representation of a translation table to the XtTranslations compiled form.
To merge translations into a widget and replace existing translations where there are conflicts, use XtOverrideTranslations(). To com-
pletely replace a widget's translation table, use XtSetValues() to set a compiled translation table on the widget's XtNtranslations
resource. To remove all of a widget's translations, use XtUninstallTranslations().
Translation tables can also be specified in string from a resource file. By default, specifying a value for the translations resource will
completely replace the existing translations. If the string form of the translation table begins with the directives "#augment" or "#over-
ride", however, then the specified translations will be merged with the widget's existing translations, and new translations that conflict
with existing translations will be ignored or will override the existing translations, respectively.
See Also
XtOverrideTranslations(1), XtParseTranslationTable(1), XtUninstallTranslations(1).
Xt - Translations and Actions XtAugmentTranslations()