Sponsored Content
Full Discussion: Mysql quary grep
Top Forums Shell Programming and Scripting Mysql quary grep Post 302987193 by batchenr on Wednesday 7th of December 2016 12:58:34 AM
Old 12-07-2016
OK,
so eventually we user dictionary option instead of array so now
the order doesn't matter as it calls the values by its name and not position.

Code:
function dick_tracy() {
        DIC[$1]=$2
}


function check () {
	declare -A DIC
	while read line
	        do
	        for i in $line
	                do
	                dick_tracy $(echo $i |sed 's/:/ /')
	                done

and we could use -
Code:
${DIC[Seconds_Behind_Master]}

i hope it will help others Smilie
Moderator's Comments:
Mod Comment Please use CODE tags (not ICODE tags) when displaying full line and multi-line sample input, sample output, and code segments.

Last edited by Don Cragun; 12-07-2016 at 02:57 AM.. Reason: Change ICODE tags to CODE tags again.
 

6 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

MySQL problem >> missing mysql.sock

MySQL on my server is down.... I figured out that the mysqld process isn't running. When I try to run it, it says it can't find mysql.sock Any suggestions? Here's what I can't do: can't be root don't have physical access (do stuff via SSH) reinstall MySQL (need to keep the current MySQL... (8 Replies)
Discussion started by: _hp_
8 Replies

2. UNIX for Advanced & Expert Users

mysql would not start: missing mysql.sock

I recently installed mysql-standard-5.0.21-solaris9-sparc-64bit.pkg on a Solaris 9 machine (SunOS 5.9 Generic_118558-19 sun4u sparc SUNW,Ultra-250). The package installation went very smooth, however, starting mysql is a different story. I get the message below everytime I try to start mysql: #... (2 Replies)
Discussion started by: xnightcrawl
2 Replies

3. Red Hat

MySQL conflicts with mysql-3.23.58-16.RHEL3.1

I am tring to install mysql 5.0 on redhat linux3. In this server mysql 3 is already installed and hence while I install mysql 5 it gives the following error. How I can install mysql 5 with out affect previous installation? bash-2.05b# rpm -i MySQL-server-community-5.0.41-0.rhel3.i386.rpm... (2 Replies)
Discussion started by: johnveslin
2 Replies

4. Shell Programming and Scripting

MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else

Hi Guys, I need to set the value of $7 to zero in case $7 is NULL. I've tried the below command but doesn't work. Any ideas. thanks guys. MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else { print $7}}' ` Harby. (4 Replies)
Discussion started by: hariza
4 Replies

5. UNIX and Linux Applications

MySQL Daemon failed to start - no mysql.sock file

After doing a yum install mysql mysql-server on Fedora 14 I wasn't able to fully install the packages correctly. It installed MySQL 5.1. I was getting the following error when running the: mysql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)... (3 Replies)
Discussion started by: jastanle84
3 Replies

6. Shell Programming and Scripting

Inconsistent `ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`

i have this line of code that looks for the same file if it is currently running and returns the count. `ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l` basically it is assigned to a variable ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
6 Replies
apertium-tagger(1)														apertium-tagger(1)

NAME
apertium-tagger - This application is part of ( apertium ) This tool is part of the apertium open-source machine translation architecture: http://www.apertium.org. SYNOPSIS
apertium-tagger --train|-t {n} DIC CRP TSX PROB [--debug|-d] apertium-tagger --supervised|-s {n} DIC CRP TSX PROB HTAG UNTAG [--debug|-d] apertium-tagger --retrain|-r {n} CRP PROB [--debug|-d] apertium-tagger --tagger|-g [--first|-f] PROB [--debug|-d] [INPUT [OUTPUT]] DESCRIPTION
apertium-tagger is the application responsible for the apertium part-of-speech tagger training or tagging, depending on the calling options. This command only reads from the standard input if the option --tagger or -g is used. OPTIONS
-t {n}, --train {n} Initializes parameters through the Kupiec's method (unsupervised), then performs n iterations of the Baum-Welch training algorithm (unsupervised). -s {n}, --supervised {n} Initializes parameters against a hand-tagged text (supervised) through the maximum likelihood estimate method, then performs n iter- ations of the Baum-Welch training algorithm (unsupervised) -r {n}, --retrain {n} Retrains the model with n additional Baum-Welch iterations (unsupervised). -g, --tagger Tags input text by means of Viterbi algorithm. -p, --show-superficial Prints the superficial form of the word along side the lexical form in the output stream. -f, --first Used if conjuntion with -g (--tagger) makes the tagger to give all lexical forms of each word, being the choosen one in the first place (after the lemma) -d, --debug Print error (if any) or debug messages while operating. -m, --mark Mark disambiguated words. -h, --help Display a help message. FILES
These are the kinds of files used with each option: DIC Full expanded dictionary file CRP Training text corpus file TSX Tagger specification file, in XML format PROB Tagger data file, built in the training and used while tagging HTAG Hand-tagged text corpus UNTAG Untagged text corpus, morphological analysis of HTAG corpus to use both jointly with -s option INPUT Input file, stdin by default OUTPUT Output file, stdout by default SEE ALSO
lt-proc(1), lt-comp(1), lt-expand(1), apertium-translator(1), apertium(1). BUGS
Lots of...lurking in the dark and waiting for you! AUTHOR
Copyright (c) 2005, 2006 Universitat d'Alacant / Universidad de Alicante. This is free software. You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>. 2006-08-30 apertium-tagger(1)
All times are GMT -4. The time now is 12:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy