consider there is create table commands in a file for eg:
like the above block there are many blocks in the file, i mean many create table queries in the file.
i have two doubts which i need help in
1) what i need to do is separate out one create table block based on idetifier such as "create table" which is the start and "ENGINE=" as end and seperate it out and write to a file for processing (which i will be doing in a while loop so that every time a new create table overwrite in that particular file for processing).
2) if i have a string "CREATE TABLE `Blahblahblah`" in a variable how to extract `blahblahblah` and store it in a variable..?
i need a shell program to extract a substring from a main string..
for eg:- main string is madhu..
sub string is mad
o/p:- be mad.
try to solve this one (5 Replies)
i need a shell program,to extract a string from a main string.
main string is "madhu"
sub string is "mad"..means any word from the main string
please di this (1 Reply)
Hi, guys. I have one question:
I need to search for a string in a file, and then extract another string from the file and assign it to a variable.
For example:
the contents of the file (group) is below:
...
ftp:x:23:
mail:x:34
...
testing:x:2001
sales:x:2002
development:x:2003
...... (6 Replies)
attempting the hangman program. This was an optional assignment from the professor. I have completed the logical coding, debugging now.
##I have an array $wordString that initializes to a string of dashes
##reflecting the number of letters in $theWord
##every time the user enters a (valid)... (5 Replies)
Hi,
May i ask if someone share some command for extracting a string between 2 ref string in a txt file
My objective: i had a file with multiple lines and wants only to extract the string "watch?v=IbkAXOmEHpY" or "watch?v=<11 random character>", when i used "grep 'watch?=*' i got a results per... (4 Replies)
Hi ,
am getting output file, it sontains the below values.
./hawk_DOM1_FIRST_ENV
./hawk_DOM2_SECOND_ENV
./hawk_DOM3_THIRD_ENV
Now I need to grep the word "DOM1_FIRST_ENV","DOM2_SECOND_ENV"
like that.
I tired with cut -d "_". Its not working with any deleimiter.
Can you please help to... (3 Replies)
Need Assistance in shell programming... I have a huge file which has multiple stations and i wanted to search particular station and extract few lines from it and the rest is not needed
Bold letters are the stations . The whole file has multiple stations .
Below example i wanted to search... (4 Replies)
Hi Team
I have an huge xml where i need to search for a ceratin numbers. For example
2014-05-06 15:15:41,498 INFO WebContainer : 10 CommonServicesLogs - CleansingTriggerService.invokeCleansingService Entered PUBSUB NOTIFY MESSAGE () -
<?xml version="1.0" encoding="UTF-8"... (5 Replies)
Hello guys,
I have problem with hpux shell script. I have one big text file that contains like
SOH
bla bla bla
bla bla bla
ETX SOH
bla bla bla
ETX
SOH
bla bla bla
ETX
What I need to do is save first SOH*BLA into file1.txt, save second SOH*BLA into file2.txt and so on.... (17 Replies)
I have the logic below to look up for matches within the columns between the two files with awk.
In the if statement is where the string comparison is attempted with ==
The issue seems to be with the operands, as
1. when " '${SECTOR}' " -- double quote followed by single quote -- awk matches... (1 Reply)
Discussion started by: deadyetagain
1 Replies
LEARN ABOUT DEBIAN
mysqmail-courier-logger
mysqmail-logger(8) System Manager's Manual mysqmail-logger(8)NAME
mysqmail-courier-logger - logs courier-imap traffic to a mysql database
SYNOPSIS
mysqmail-courier-logger subprogram [ args ... ]
DESCRIPTION
mysqmail-courier-logger reads the syslog using tail -F, and for each dovecot lines of POP3 and IMAP corresponding to a disconnection, mysq-
mail-courier-logger writes the total used bandwidth corresponding to the username. Configuration is read from /etc/mysqmail.conf.
mysqmail-courier-logger uses a table corresponding to this one:
CREATE TABLE IF NOT EXISTS pop_access (
id varchar(32) NOT NULL default '',
uid int(11) NOT NULL default '65534',
gid int(11) NOT NULL default '65534',
home varchar(255) NOT NULL default '',
shell varchar(255) NOT NULL default '',
mbox_host varchar(120) NOT NULL default '',
crypt varchar(50) NOT NULL default '',
passwd varchar(50) NOT NULL default '',
active int(11) NOT NULL default '1',
start_date date NOT NULL default '0000-00-00',
expire_date date NOT NULL default '0000-00-00',
quota_size int(11) NOT NULL default '0',
type varchar(20) NOT NULL default 'default',
memo text,du bigint(20) NOT NULL default '0',
another_perso varchar(5) NOT NULL default 'no',
redirect1 varchar(255) default NULL,
redirect2 varchar(255) default NULL,
localdeliver varchar(10) NOT NULL default 'yes',
pop3_login_count int(9) NOT NULL default '0',
pop3_transfered_bytes int(14) NOT NULL default '0',
imap_login_count int(9) NOT NULL default '0',
imap_transfered_bytes int(14) NOT NULL default '0',
last_login int(14) NOT NULL default '0',
PRIMARY KEY (id,mbox_host) ) TYPE=MyISAM
To have mysqmail-courier-logger working, you should have issued mkfifo /var/log/courier.fifo to create the fifo and use nohup cat
/var/log/courier.fifo | /usr/bin/mysqmail-courier-logger > /dev/null 2>&1 & to launch it.
VERSION
This documentation describes mysqmail-courier-logger version 0.1.4. See http://gplhost.com/softwares-mysqmail.html for updates.
SEE ALSO qmail-send(3), syslog(3), logger(8)mysqmail-logger(8)