08-27-2009
hey chipcmc,
Thank you for the help. the conditions that you gave me really helped!. Appreciate it
thanks
Arsenal Boy
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm looking for a way to match a particular string in another string and if a match is found execute some command.
I found the case statement can be used like this;
case word in
)
command ;; ] ...
esac
If my string to find is say "foo" in the string $mystring... (1 Reply)
Discussion started by: paulobrad
1 Replies
2. Shell Programming and Scripting
Hello Members
I am facing a problem regarding pattern matching.please guide me to solve the issue.My requirement is like:
There is table in oracle database, in that table contain columns ,inside the column so many files are there. my requirement is that to search a pattern for example: pattern... (5 Replies)
Discussion started by: rakeshforum
5 Replies
3. Shell Programming and Scripting
Hi,
I need to create a shell script through which i need to populate email addresses in email columns of database table in mysql. Let say if email contains yahoo, hotmail, gtalk than email addresses need to move in their respective columns.
# !/bin/sh
yim="example@yahoo.com"... (3 Replies)
Discussion started by: mirfan
3 Replies
4. Shell Programming and Scripting
Hi,
I am using following command to extract string from a file. String will be after last / (slash).
awk -F\ / '{print $NF}' $FILE
but while appending the output in file in script, it dosent work. File created but of zero size... can anyone please help
`awk -F\\\/ '{print $NF}' $FILE` >... (3 Replies)
Discussion started by: Deei
3 Replies
5. Shell Programming and Scripting
Guys, i'm new to shell scripting. Here's what i need.
I need a shell script which would read a file containing only 1 line which never changes.
File containts -
SQL_Mgd_Svc_ELONMCL54496 |EMEA\brookkev, EMEA\fieldgra, EMEA\tidmamar, EMEA\attfiste, EMEA\baldogar, EMEA\clarkia2, EMEA\conwasha,... (9 Replies)
Discussion started by: butterfly20
9 Replies
6. Shell Programming and Scripting
Please help me in this issue.
I am unable to get the job,seems the awk not browsing the files.
Please find my tries below.
I have attached two files :
1.tobesearched.txt - a glimpse of a huge log file.
2.searchstring.txt - searching keys.
these are the two scripts i tried writing:
... (7 Replies)
Discussion started by: deboprio
7 Replies
7. Shell Programming and Scripting
Hi friends.. I have many dirs in my working directory. Every dir have thousands of files (.jsp, .java, .xml..., etc). So I am working with an script to find every file recursively within those directories and subdirectories ending with .jsp or .java which contains inside of it, the the pattern... (3 Replies)
Discussion started by: hnux
3 Replies
8. Shell Programming and Scripting
Hi
I want to find a line in a file which contains a word and replace the patterns.
Sample file content temp.xml
====================
<applications>
<application>
Name="FirstService"
location="http://my.website.selected/myfirstService/V1.0/myfirst.war"
... (1 Reply)
Discussion started by: sakthi.99it
1 Replies
9. Shell Programming and Scripting
Hi all,
Is Perl included by default in Ubuntu? I'm trying to write a program using as few languages as possible, and since I'm using a few Perl one-liners to do non-greedy matching, it's considered another language, and this is a bad thing.
Basically, I'm using a Perl one-liner to grab XML... (3 Replies)
Discussion started by: Zel2008
3 Replies
10. Shell Programming and Scripting
Hi
I need to do a patten match between files .
I am new to shell scripting and have come up with this so far. It take 50 seconds to process files of 2mb size . I need to tune this code as file size will be around 50mb and need to save time.
Main issue is that I need to search the pattern from... (2 Replies)
Discussion started by: nitin_daharwal
2 Replies
LEARN ABOUT DEBIAN
wuzzah
wuzzah(1) Wuzzah? wuzzah(1)
NAME
wuzzah - keep an eye out for friends on a local system
SYNOPSIS
wuzzah [OPTIONS...]
DESCRIPTION
wuzzah is a program that just sits around and scans the utmpx entries to watch when your friends log in and out. By default upon invoca-
tion, wuzzah looks for the file ${HOME}/.wuzzah, and loads the list of buddies contained therein (which are separated by newlines), and
then sits and watches. If no file is found, and no other readable file is specified (see OPTIONS), wuzzah will attempt to just watch for
whomever the current uid maps, and failing that will just quit.
OPTIONS
-h, --help
an informative usage summary, though nothing you don't see here...
-a, --all-users
watches for all users on the system, period.
-c, --exec-cmd=CMD
execute CMD upon a login. NOTE: this is done with a call to system(2), so you can do things like piping and whatever else you can
do with sh -c
-f, --buddy-file=FILE
use FILE as buddyfile. naturally FILE must be readable, and consists of usernames, one to a line. optionally, these usernames can
be followed by a colon, and then a wuzzah command-line to override wuzzah's behavior for this specific user.
-F, --no-buddyfile
tells wuzzah to not bother loading any config files.
-i, --interval=NUM
sleep NUM seconds between each polling
-m, --message=STRING
use STRING as a message template to greet logged-in buddies. See the section FORMATS for more information.
-n, --no-newline
don't end the messages with newlines (normally does by default)
-o, --process-once
scan the login records once, then exit
-p, --process-current
by default wuzzah doesn't message users who were already logged in when started up. this option overrides such behavior and mes-
sages them anyways (only useful with the -w/-c options)
-q, --silent
don't message buddies when they log in (default).
-s, --status-message=STRING
use STRING as a template for displaying the status of people logging in and out. See FORMATS for more information.
-u, --users=LIST
adds every user in LIST (a space/comma/colon separated list of users) to the buddy list
-v, --version
the current version and copyright.
-w, --write-buddies
turns on messaging of buddies as they log in. NOTE: this can get quite annoying rather quickly. tune in soon for a less annoying
solution
FORMATS
message templates can be defined as normal character strings, interspersed with special format characters. format characters consist of a
`%', followed by a character, which defines situation-specific data. The current list of these characters is as follows:
a the alert character ('a')
b the name of the buddy who has logged in/out
d the date, currently in HH:MM:SS format
h and H
the remote hostname or IP address (respectively) of your buddy's login
l the line in/out on which the buddy is logged (typically, something like /dev/pts/9 or /dev/ttyS0)
m whether or not you have just messaged your buddy (really only useful for the -s option)
n an embedded newline character
o your buddy's online status ("logged on" or "logged off")
u your own username, as can best be determined by the program.
EXAMPLES
a simple invocation:
username@machine$ wuzzah
(13:45:39) foo logged in on :0 (not messaging).
(13:45:39) bar logged in on pts/11 (not messaging).
Message from username@machine on pts/11 at 14:00 ...
(wuzzah) username says: "shoutout to my homie foo."
EOF
an example with a little more user customization:
username@machine$ wuzzah --message="hey, %b, it's %u. nice to see you at %d!"
and when foo logs in, foo will get a message like so:
Message from username@machine on pts/11 at 14:00 ...
hey, foo, it's username. nice to see you at (14:00:00)!
EOF
FILES
$HOME/.wuzzah
the default file containing the list of users to watch
BUGS
don't know of any, but reports (and patches too) are always welcome. feel free to send them to the author.
AUTHOR
sean finney <seanius@seanius.net>
sean finney Sun Nov 17 02:41:45 EST 2002 wuzzah(1)