Planet MySQL Planet MySQL: Meta Deutsch Español Français Italiano 日本語 Русский Português 中文
10 Newer Entries Showing entries 31 to 40 of 41 1 Older Entries

Displaying posts with tag: bash (reset)

Gentlemen, Slap your Engines!
Employee +0 Vote Up -0Vote Down

Once again, I was unable to attend all of the sessions I wanted to at this year's User Converence, but I was happy to make it to Bob Burgess' talk on bash scripting with mysql. The slides and examples aren't up yet, but when they are (which may be as you read this, check the last link), they would probably also be a great tutorial.


So, I got bore^D^D^D^D inspired later that day to put some of the practices into use, and …


  [Read more...]
Gentlemen, Slap your Engines!
Employee +0 Vote Up -0Vote Down

Once again, I was unable to attend all of the sessions I wanted to at this year's User Converence, but I was happy to make it to Bob Burgess' talk on bash scripting with mysql. The slides and examples aren't up yet, but when they are (which may be as you read this, check the last link), they would probably also be a great tutorial.


So, I got bore\^D\^D\^D\^D inspired later that day to put some of the practices into …


  [Read more...]
Gentlemen, Slap your Engines!
Employee +0 Vote Up -0Vote Down

Once again, I was unable to attend all of the sessions I wanted to at this year's User Converence, but I was happy to make it to Bob Burgess' talk on bash scripting with mysql. The slides and examples aren't up yet, but when they are (which may be as you read this, check the last link), they would probably also be a great tutorial.


So, I got bore\^D\^D\^D\^D inspired later that day to put some of the practices into …


  [Read more...]
RESET SLAVE, bash edition
+0 Vote Up -0Vote Down

Nearly every job advertisement for MySQL DBA positions asks for ’shell scripting’, so I decided to investigate what it is. I remembered some performance training, where I was told how forking is bad, and one should attempt to use shell features as much as possible (like, avoid paths to something, what can be used by builtin (e.g. don’t use /usr/bin/[, just pure [ instead )

I tried to automate one MySQL DBA task (reinitializing slave after relay log corruption or after copying in cloned dataset from other server) using just bash - and it kind of worked. From now on I can put 'Shell scripting' proudly on my resume :-)

Next step - learn JCL …

  [Read more...]
Mastering The Linux Shell – Bash Shortcuts Explained (Now With Cheat Sheets)
+0 Vote Up -0Vote Down

During my day-to-day activities, I use the Bash shell a lot. My #1 policy is to optimize the most frequently used activities as much as possible, so I’ve compiled these handy bash shortcuts and hints (tested in SecureCRT on Windows and Konsole on Linux). The article only touches on the default bash mode – emacs, not vi. If you haven’t specifically assigned your shell mode to vi (set –o vi), you’re almost certainly using the emacs mode. Learn these and your shell productivity will skyrocket, I guarantee it.

Update #1: In response to a few people saying this list is too short and “[he] …

  [Read more...]
KDE Konsole Backgrounds and ssh
+0 Vote Up -0Vote Down


If you are a GUI-oriented person, you need not read this. But if you are like me, you make heavy use of the console. If you are managing many machines as well as your own Linux workstation, it’s VERY important to know where your console session is.

Too many times in the past I had wanted to bring down my workstation, and would type “shutdown” or “reboot” in the console window, only to find out to my horrors that the console was really a remote session to one of my web servers serving up hundreds of web sites.

Whoops!

Well, that prompted me into developing a solution where I can tell at a …


  [Read more...]
Summary of beCamp 2008
+0 Vote Up -0Vote Down

Yesterday I went to beCamp 2008 along with four roomfuls of other people interested in technology (perhaps close to 100 people total). The conference was a lot of fun. Not everything went as planned, but that was as planned. This was an Open Spaces conference and I thought it worked very well. From an email Eric Pugh sent:

Basically it all boils down to:

Open Space is the Law of Two Feet: if anyone finds themselves in a place where they are neither …

  [Read more...]
Command Line History
+0 Vote Up -0Vote Down

Inspired by the Rail Spikes:

bash-3.2$ history 1000 | awk '{a[$2]++}END{for(i in a){print a[i] " " i}}' | sort -rn | head

228 cd

167 git

10 ssh

10 DEPLOY=production

6 sudo

6 pwd

6 ./script/import_views.rb

5 rm

4 rake

4 mv

bash-3.2$

Really interesting stats, I’d never guess that git is used more than ssh on my desktop (I’m a …























  [Read more...]
Skip duplicate entries in a slave
+0 Vote Up -0Vote Down

A

Saying What You Mean
+0 Vote Up -0Vote Down

Ah, the perils of working in a shared, client environment. One client has us using a login that is not exclusive to us. I prefer using bash; the client is set to use zsh. This is not a problem in and of itself.

However, there is a section in the .profile that is causing me issues:

if [ -f /usr/bin/ksh ]; then
        /usr/bin/ksh -o vi
        exit
fi

So, “If ksh exists, run it with some options to edit history with vi-like commands”. Except what we really want is “If you’re using the ksh as a shell, . . . .”

So I added a modification, and now all is fine.

if [ -f /usr/bin/ksh ]; then
        if [ "$SHELL" …
  [Read more...]
10 Newer Entries Showing entries 31 to 40 of 41 1 Older Entries

Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.