f

Issue with the 'script' command in users '.kshrc' and '.bashrc' files

I am attempting to monitor users actions by using the following
'script' command:

# exec script -a /tmp/${LOG} In order to capture all types of login whether 'telnet', su, su - etc etc I have put it into the .profile, .dtprofile and the *rc shell files. This works fine for CSH and SH, however if I launch another session (dtterm &) or switch shell to either KSH or BASH, then it seems to spin round and attempt to infinately create fresh 'script' sessions until I quit out. Example below: Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x Script started, file is /tmp/x ^C Broken Pipe glynch@mipsqux80:/users/is/glynch:> The irony here is that the exact ssame command (script -a filename) works from a KSH command line, but not from the .kshrc (or .basrc) run files. Any ideas as to what the HELL is going on and (more importantly) what the solution is? TIA Glynch.   0 glynch (1) 4/25/2005 4:31:23 PM comp.unix.shell 15484 articles. 3 followers. 3 Replies 1040 Views Similar Articles [PageSpeed] 27 On comp.unix.shell, in <bb3a73a.0504250831.1f6209a0@posting.google.com>, "Glynch" wrote: > I am attempting to monitor users actions by using the following > 'script' command: > > # exec script -a /tmp/${LOG}
>
> In order to capture all types of login whether 'telnet', su, su
> - etc etc I have put it into the .profile, .dtprofile and the
> *rc shell files.  This works fine for CSH and SH, however if I
> launch another session (dtterm &) or switch shell to either KSH
> or BASH, then it seems to spin round and attempt to infinately
> create fresh 'script' sessions until I quit out.  Example
> below:
>

> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> Script started, file is /tmp/x
> ^C
> Broken Pipe
> glynch@mipsqux80:/users/is/glynch:>
>

> The irony here is that the exact ssame command (script -a
> filename) works from a KSH command line, but not from the
> .kshrc (or .basrc) run files.
>
> Any ideas as to what the HELL is going on and (more
> importantly) what the solution is?
>
> TIA
>
> Glynch.

I'd put it in your bash_profile , not in the .bashrc,
which will be re-read with every new window that's
created.

It should have this in it:

if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi

The loop is occuring because "script" is reading the .bashrc
file,  then running your session in a subshell, which is
also reading the .bashrc which is calling script again,
which is...

I don't think that "script" is a suitable tool for graphical
shells (X).

Nor does it seem to me to be a good tool for just monitoring

Not sure what the best one would be. You could start with
man who, man wtmp, man utmp.

HTH

AC

--
even tried to mail me. http://tinyurl.com/2t5kp

~

 0
Alan
4/25/2005 8:33:36 PM
Hi Alan,

Many thanks for the speedy response and thoughtful explanations, I now
fully understand the looping issue.  Whilst your suggestion resolves my
looping issue, it doesn't fully resolve my original problem.  I am
attempting to capture all user activity by using 'script' (ugly though
it may be).  This works fine for telnet sessions, however once logged
in we also want to track subsequent 'su - username' activity and users
starting new shells/windows ('ksh', 'xterm', 'dtterm', etc.), hence why
I originally added the commands to the '.kshrc' and '.bashrc' files.
We want to be able to keep tracking their activity and prevent them
from circumventing the script by spawning new shells etc.

Do you or anyone else have any other ideas?

TIA.

Glynch.

Alan Connor wrote:
> On comp.unix.shell, in
>
> > I am attempting to monitor users actions by using the following
> > 'script' command:
> >
> > # exec script -a /tmp/${LOG} > > > > In order to capture all types of login whether 'telnet', su, su > > - etc etc I have put it into the .profile, .dtprofile and the > > *rc shell files. This works fine for CSH and SH, however if I > > launch another session (dtterm &) or switch shell to either KSH > > or BASH, then it seems to spin round and attempt to infinately > > create fresh 'script' sessions until I quit out. Example > > below: > > > > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > Script started, file is /tmp/x > > ^C > > Broken Pipe > > glynch@mipsqux80:/users/is/glynch:> > > > > > The irony here is that the exact ssame command (script -a > > filename) works from a KSH command line, but not from the > > .kshrc (or .basrc) run files. > > > > Any ideas as to what the HELL is going on and (more > > importantly) what the solution is? > > > > TIA > > > > Glynch. > > I'd put it in your bash_profile , not in the .bashrc, > which will be re-read with every new window that's > created. > > The .bash_profile is read once, when you login. > > It should have this in it: > > if [ -f ~/.bashrc ]; then > source ~/.bashrc > fi > > The loop is occuring because "script" is reading the .bashrc > file, then running your session in a subshell, which is > also reading the .bashrc which is calling script again, > which is... > > I don't think that "script" is a suitable tool for graphical > shells (X). > > Nor does it seem to me to be a good tool for just monitoring > logins. > > Not sure what the best one would be. You could start with > man who, man wtmp, man utmp. > > HTH > > AC > > > -- > alanconnor AT earthlink DOT net > Use your real return address or I'll never know you > even tried to mail me. http://tinyurl.com/2t5kp > > ~   0 glynch 4/26/2005 9:33:58 AM On comp.unix.shell, in <1114508038.633820.7980@o13g2000cwo.googlegroups.com>, "glynch@maninvestments.com" wrote: [ please don't top post ] > Hi Alan, > > Many thanks for the speedy response and thoughtful > explanations, I now fully understand the looping issue. Whilst > your suggestion resolves my looping issue, it doesn't fully > resolve my original problem. I am attempting to capture all > user activity by using 'script' (ugly though it may be). This > works fine for telnet sessions, however once logged in we also > want to track subsequent 'su - username' activity and users > starting new shells/windows ('ksh', 'xterm', 'dtterm', etc.), > hence why I originally added the commands to the '.kshrc' and > '.bashrc' files. We want to be able to keep tracking their > activity and prevent them from circumventing the script by > spawning new shells etc. > > Do you or anyone else have any other ideas? > > TIA. > > Glynch. > I think I am following you. You are offering shell accounts to folks. One approach is to replace the login shell (in /etc/passwd) with a script that calls a restricted shell and exits/logsouts if illegal commands are run using trap (help trap on bash) Or just echos a warning to their terminal/psuedo-terminal and refuses to run the commands, as well as logging the violation. If you just want to log their activities and mail them later with reprimands, then it seems like you need to create (or find) a daemon that will track this activity through the /proc virtual filesystem, reading the output of ps or top and alerting you (probably by mail) when certain strings occur in that output. The one utility that tells ALL is lsof run by root. This lists all open files of any kind, and who (or what) has opened them. It has an amazing number of options that give all sorts of controlled output for parsing by other utilities/scripts, on a per-user basis if desired. See, in particular, the -F option for formatted output. As I'm sure you know, everything on a nix system involves opening one sort of file or another. /usr/sbin/lsof There MUST be a utility available, probably more than one, that does exactly what you want. I just don't know what it is. I'd spend some time on google if I were you. These are debian packages that might be relevant: Package: sac Section: admin Installed-Size: 204 Maintainer: Javier Fernandez-Sanguino Pen~a <jfs@computer.org> Architecture: i386 Version: 1.9b1-1 Depends: libc6 (>= 2.1.2) Filename: pool/main/s/sac/sac_1.9b1-1_i386.deb Size: 52726 MD5sum: 57c1f3ebd01fac6e49e4ff9c0ae281ac Description: Login accounting Performs login accounting, just like the ac program but with totals, per day and per users. Also performs average usage and hourly profiling. Tons of other options. Package: pdmenu Priority: optional Section: shells Installed-Size: 236 Maintainer: Joey Hess <joeyh@debian.org> Architecture: i386 Version: 1.2.69 Depends: libc6 (>= 2.2.3-1), libgpmg1 (>= 1.14-16), slang1 (>> 1.3.0-0) Suggests: menu (>= 2.0.0-5) Conflicts: menu (<< 2.0.0-5) Filename: pool/main/p/pdmenu/pdmenu_1.2.69_i386.deb Size: 50846 MD5sum: 34633056c210e8cc78d5495fa4ffd8dc Description: Simple full screen menu program. A simple full screen menu program, intended to be comfortable login shell for inexperienced users. Pdmenu interfaces with Debian's menu system, to provide automatically-generated lists of installed programs. Package: rusersd Priority: optional Section: net Installed-Size: 76 Maintainer: Herbert Xu <herbert@debian.org> Architecture: i386 Source: netkit-rusers Version: 0.17-3 Replaces: netstd Depends: portmap | netbase (<< 4.00), libc6 (>= 2.2.3-7) Filename: pool/main/n/netkit-rusers/rusersd_0.17-3_i386.deb Size: 9724 MD5sum: 01f7fee779b039d9c0ea4266173427d5 Description: Logged in users server. This is a server which returns information about users currently logged in to the system. Search http://freshmeat.net and http://sourceforge.net and and contact the sysadmins at other shell account providers. If you see an application that is close to what you want, search for the homepages of the maintainer or creator and see what else they have done along those lines. What you are looking for is no ordinary shell script, I think. Have a good one, AC -- alanconnor AT earthlink DOT net Use your real return address or I'll never know you even tried to mail me. http://tinyurl.com/2t5kp ~   0 Alan 4/26/2005 1:50:58 PM  Reply: Similar Artilces: 'is not' or '!=' A newbie question to you; what is the difference between statements like: if x is not None: and if x != None: Without any context, which one should be preferred? IMHO, the latter is more readable. On 2014-08-18 21:35, ElChino wrote: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: > > Without any context, which one should be preferred? > IMHO, the latter is more readable. > "x == y" tells you whether x and y refer to objects that are equal. "x is y" tells you whether x and y actually refer to the same object. In the case of singletons like None (there's only one None object), it's better to use "is". "ElChino" <elchino@cnn.cn>: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: Do the following: take two$10 bills. Hold one bill in the left hand, hold the other bill in the right hand. Now, the bill in the left hand "is not" the bill in the right hand. However, the bill in the left hand "==" the bill in the right hand. > Without any context, which one should be preferred? > IMHO, the latter is more readable. In almost all cases, both tests would result in the same behavior. However, the "is not" test is conceptually the correct one since you want...

'^=' and '~='?
Hello, What is the difference between '^=' and '~='? Thanks, Duckhye ...

'''''''''''''The Running Update/Append Queries Using VBA code Ordeal''''''''''''''
Hello fellow programmers, I am trying to run an append/update query from code, a command button on a form initiates the queries. the format i am using is; _____________________________________________________ SELECT "criteria" FROM "criteria" WHERE "criteria" UPDATE/APPEND "field selections" RecordSource "qryExample" = above text strings" _______________________________________________________________________ When i am running a SELECT query in this manner it works fine with no problems, and accepts the values of specified linked form fields. This never works when doing an APPEND/UPDATE query. It can never find the values of linked form fields, Access always asks for the parameter value of the field(s) in question, or Access comes up with an error 3323 - No recordset. I am sure there are other people that have had this problem. What is the difference between Select queries and append/update queries? the append/update queries never seem to be able to find values in linked form fields. Can anyone shed any light on this or point to a knowledgebase Item, or even recommend a book focusing on this subject, I will go and buy it now. I have been for up 2 nights trying to acomplish this and now considering suicide, please help. Thanks In advance, Aaron. I know of two ways you can accomplish this. 1. You can create the SQL script for you append or update query and run the script with DoCmd.RunSQL. 2. You can create a...

'''''''''''''The Running Update/Append Queries Using VBA code Ordeal'''''''''''''' #2

if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.') Any shorter ?
Hi, there. =20 I'm just curious if it ever dawned on anybody how to abbreviate this line : if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.')=20 =20 Igor Kurbeko Clinical Programmer Analyst 678 336 4328 ikurbeko@atherogenics.com =20 no brain no pain =20 how about: if not (str_mo in ('','.') or str_da in ('','.') or str_yy in ('','.')) OR if not (missing(str_mo) or missing(str_da) or missing(str_yy)) Eric On 22 Oct 03 21:13:37 GMT, ikurbeko@ATHER...

A function with 'and' , 'not' , 'null' , 'car' and 'cdr'
What's this ? (defun enigma (x) (and (not (null x)) (or (null (car x)) (enigma (cdr x))))) "I suppose I should learn Lisp, but it seems so foreign." - Paul Graham, Nov 1983 On Wed, Oct 07 2015, CAI GENGYANG wrote: > What's this ? > > > (defun enigma (x) > (and (not (null x)) > (or (null (car x)) > (enigma (cdr x))))) Bad taste? It returns T if the list X contains nil as an element. It would be clearer to write (some #'null x). Helmut CAI GENGYANG ...

error: expected '=', ',', ';', 'asm' or '__attrib
Hi I'm trying to compile an ADC Driver & come acrosss the following error. I've no experience writing drivers before, and hence have no clue how to fix it. Hope someone out there has encountered the problem & suggesst a fix for the same. The Error is I get is : qadc.c: At top level: qadc.c:97: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'qadc_read' make: *** [qadc.o] Error 1 [root@localhost qadc]# ########################################################################### ADC Driver Code ##...

error: expected '=', ',', ';', 'asm' or '__attrib
Hi I'm trying to compile an ADC Driver & come acrosss the following error. I've no experience writing drivers before, and hence have no clue how to fix it. Hope someone out there has encountered the problem & suggesst a fix for the same. The Error is I get is : qadc.c: At top level: qadc.c:97: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'qadc_read' make: *** [qadc.o] Error 1 [root@localhost qadc]# ########################################################################### ADC Driver Code ########################################################################### #define MODULE #define __KERNEL__ #include <linux/config.h> #include <linux/module.h> #include <linux/kernel.h> /* printk */ #include <linux/fs.h> / #include <linux/errno.h> /* error codes */ #include <linux/types.h> /* size_t */ #include <linux/proc_fs.h> /* proc file system */ #include <linux/fcntl.h> #include <asm/system.h> /* cli, flags */ #include <asm/uaccess.h> /* copy from/to user */ /*Registers to get qadc access*/ volatile unsigned short * qadcmcr = (unsigned short *)0x40190000; volatile unsigned short * qacr0 = (unsigned short *)0x4019000a; volatile unsigned short * qacr1 = (unsigned short *)0x4019000c; volatile unsigned short * qacr2 = (unsigned short *)0x4019000e; volatile unsigned short * qasr0 = (unsigned short *)0x40190010; volatile unsigned short * qasr1...

difference between ',' and 'a,'
Small question. In gforth is there a difference between the words ',' and 'a,'? I'm thinking not, so perhaps another question, why have both ',' and 'a,'? Thanks Should be the same, in gforth: see , : , here cell allot ! ; ok see a, : , here cell allot ! ; ok On Friday, January 9, 2015 at 5:46:04 AM UTC-8, beeflo wrote: > Small question. In gforth is there a difference between the words ',' and 'a,'? > > I'm thinking not, so perhaps another question, why have both ',' and 'a,'? > > Thanks beeflo <beeflobill@gmail.com> writes: >Small question. In gforth is there a difference between the words ',' and 'a,'? > >I'm thinking not, so perhaps another question, why have both ',' and 'a,'? In Gforth itself, there is no difference. In Gforth's cross compiler, "a," is there for addresses, and "," is there for other cells; addresses can then be relocated when loading the image. - anton -- M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html New standard: http://www.forth200x.org/forth200x.html EuroForth 2014: http://www.euroforth.org/ef14/ ...

'[OFF]' as in 'offensive'???
Hi, given that 'off-topicness' is indicated as '[OT]' and taking a look at those postings that started the threads indicated as '[OFF]' (which may both be seen as being somewhat offensive) may lead to the conclusion that '[OFF]' stands for offensiveness. I don't think that this is the intended meaning so what actually *does* '[OFF]' mean? I never came across that abbreviation before (although I have been around on the USENET for quite some time) but maybe it is worth knowing? Josef 'Jupp' Schugt NOTE: mails >100 KiB are ignored -- German edition of comp.lang.ruby FAQ - http://oss.erdfunkstelle.de/ruby/ Aurox Linux - http://qurl.net/7q | http://qurl.net/7r - Firefox Thunderbird - http://qurl.net/7s | http://qurl.net/7t - Liferea Enigmail - http://qurl.net/7u | http://qurl.net/7v - GnuPG [Josef 'Jupp' Schugt <jupp@gmx.de>, 2004-12-10 23.20 CET] > I don't think that this is the intended meaning so what actually *does* > '[OFF]' mean? Off-topic. ...

logical to 'on' / 'off'
Hi, is there a function implemented doing this conversion? my Problem is, that I want to use the following code: set(handles.edit_curr_trq_sl,'Enable',get(hObject,'Value')) where get(hObject,'Value') gives the state of a checkbox thank you! function [str]=tf2oo(logic) switch logic case 0 str='off'; case 1 str='on'; end%switch end%function tf2oo() while i do not know a built in function, I use my own:) meisterbartsch wrote: > > > function [str]=tf2oo(logic) > switch logic > case 0 > str='off'; &g...

Override 'and' and 'or'
Is it possible to override 'and' and/or 'or'? I cannot find a special method for it... __and__ and __rand__ and __or__ and __ror__ are for binary manipulation... any proposals? Have marvelous sunday, Marco Dekker <m.aschwanden@gmail.com> wrote: > Is it possible to override 'and' and/or 'or'? I cannot find a special > method for it... __and__ and __rand__ and __or__ and __ror__ are for > binary manipulation... any proposals? If you want to customize the truth value testing you have to implement __nonzero__ " __nonzero__( self) Call...

Does '!=' equivelent to 'is not'
I'm a bit confusing about whether "is not" equivelent to "!=" if a != b: ... if a is not b: ... What's the difference between "is not" and "!=" or they are the same thing? pirata wrote: > I'm a bit confusing about whether "is not" equivelent to "!=" > > if a != b: > ... > > if a is not b: > ... > > > What's the difference between "is not" and "!=" or they are the same thing? No, they are not the same thing. == and != test to see if the *value* of two variables are the same. Like so: >>> a = 'hello world' >>> b = 'hello world' >>> a == b True a and b both have the value of 'hello world', so they are equal is and is not, however, do not test for value equivalence, they test for object identity. In other words, they test to see if the object the two variables reference are the same object in memory, like so: >>> a is b False a and b are assigned to two different objects that happen to have the same value, but nevertheless there are two separate 'hello world' objects in memory, and therefore you cannot say that a *is* b Now look at this: >>> c = d = 'hello world' >>> c == d True >>> c is d True In this case, they are again the same value, but now the is test also shows that they are the same *object* as well, because...

replacement for '{' and '}' ?
I am still playing around with what kind of syntax I would like to mark up my documents. Are there equivalent long substitutes for { and } when they are not used to describe arguments to functions? Something like \begin{group} and \end{group}. In other words, if I could force myself to write, say, \begin{group} \it ... \end{group} instead of {\it ... }, then I believe I could identify from the markup context what is an argument that belongs to a just invoked macro and what is text. {Of course, in this context, \textit{...} would be better.} No more ambiguity whether a in \myfunction{a} is an argument or just text. Is there a way to make latex barf when it sees an ordinary '{' in text, rather than \begin{group}, but not barf when I want it (to denote macro arguments)? Regards, /iaw On Aug 16, 6:01=A0pm, "ivo...@gmail.com" <ivo...@gmail.com> wrote: > Is there a way to make latex barf when it sees an ordinary '{' in > text, rather than \begin{group}, but not barf when I want it (to > denote macro arguments)? What do you mean exactly? I don't understand. Do you have in mind your- to-be-new-syntax or just regular latex? Cheers, Tomek ivowel@gmail.com wrote: > I am still playing around with what kind of syntax I would like to > mark up my documents. > > Are there equivalent long substitutes for { and } when they are not > used to describe arguments to functions? Something like \begin{group} > and \end{gr...

Difference between 'is' and '=='
Hey guys, this maybe a stupid question, but I can't seem to find the result anywhere online. When is the right time to use 'is' and when should we use '=='? Thanks alot~ mwql: >Hey guys, this maybe a stupid question, but I can't seem to find the >result anywhere online. When is the right time to use 'is' and when >should we use '=='? http://docs.python.org/ref/comparisons.html -- Ren� Pijlman mwql wrote: > Hey guys, this maybe a stupid question, but I can't seem to find the > result anywhere online. When is the right time to ...

'!' vs. '.'
Is there an advantage to using the '!' notation to represent form/ control relationships? (eg. Me!text1 vs Me.text1) I am currently using the '.' notation exclusively (for code completion in the VB Editor), but much of the high-quality code that I've seen (in Duane Hookom's Query-by-Form db, for example) uses the other. Here's one opinion for you: http://doc.advisor.com/doc/05352 robert.waters wrote: >Is there an advantage to using the '!' notation to represent form/ >control relationships? (eg. Me!text1 vs Me.text1) > >I am currently using the '.' notation exclusively (for code completion >in the VB Editor), but much of the high-quality code that I've seen >(in Duane Hookom's Query-by-Form db, for example) uses the other. -- HTH - RuralGuy (RG for short) acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/200704/1 Here's my $0.02 worth on this. I tend to copy the notation style and naming conventions that I see being used in the Help files. That would be Me![text1] for a control on a form. I am of the belief that this notation explicitly refers to a control itself rather than a field in the form's recordset. Here's an example: I have a parts inventory app that uses a "Line" code, which is usually a 3-character abbreviation for a brand name, and is the na... Re: '^=' and '~='? Duckhye, According to the doc ( http://xrl.us/befwjx ) they, and one other set of characters, and the mnemonic 'NE' all represent 'NOT EQUAL'. Art ------- On Wed, 11 Feb 2009 16:52:40 -0600, Duck-Hye Yang <dyang@CHAPINHALL.ORG> wrote: >Hello, >What is the difference between '^=' and '~='? > >Thanks, >Duckhye ... 'a'..'z' Is it possible to achieve something like this? switch (mystring.charAt(0)) { case 'a'..'z': // do something break; } "cruster" <cruster@gmail.com> wrote in message news:1151319731.988814.326200@m73g2000cwd.googlegroups.com... > Is it possible to achieve something like this? > > switch (mystring.charAt(0)) { > case 'a'..'z': > // do something > break; > } > There are times when an if statement may be more appropriate ;) Sorry - java is not VB :) -- LTP :) cruster schreef: > Is it possible to achieve somethi... We Are Selling The Nextel I930 For Just$130usd'''''''''''
Dear Customer We have all brands of Mobile Phones,Ipods,Sidekicks,Nextel phone,Laptops for sell at cheap an affordable prices, they ranges from Nokia/Samsung/LG/Son Ericsson/Motorola/Alcatel/panasonic With Bluetooth, al Brands and Models of Nextel Phones, we want you to get bac to us with your quote so that we can begin a good busines relationship. Note they are all Brand New T2 Euro specs unlocked, no operator logo, come in thei original sealed box, With 1 year international warrant from the manufacturer, English & Spanish manual, Finlan made We want to assure you that you will never regret buyin from us because the delivery will be to your doorstep vi FedEx Courier service.And the Tracking number shall be sen to you upon acknowledgement of your payment Kindly acknowledge the reciept of our mail and get back t us at mobiledealer_ltd@yahoo.co -- lolasam whats your url? lolasam wrote: > Dear Customers > > We have all brands of Mobile Phones,Ipods,Sidekicks,Nextels > phone,Laptops for sell at cheap and > affordable prices, they ranges from Nokia/Samsung/LG/Sony > Ericsson/Motorola/Alcatel/panasonic With Bluetooth, all > Brands and Models of Nextel Phones, we want you to get back > to us with your quote so that we can begin a good business > relationship. Note they are all Brand New T2 Euro specs, > unlocked, no operator logo, come in their > original sealed box, With 1 year international warranty > from the manufacturer, English &a...

Re: if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.') Any shorter ? #2
Igor, There are many ways to make it more concise, however the parsimony is likely to be achieved at the expense of clarity. For instance, the expressions length ( input (mm||dd||yy, $10.) ) > 2 length ( compress(mm||dd||yy, ' .') ) > 2 and like might be somewhat shorter than the original, but they will execute slower, and their intent is far less eminent. Since it appears that you are trying to validate the components of a date, maybe it is not a worthless idea to try the date informat conforming to the mask you are testing. Say if all the pieces are 2-digit, the expression input (mm||dd||yy, ?? mmddyy6.) will return a missing value for the case you are testing and also if any irregularities in the input value that prevent it from being interpreted as a valid date should be found. And if you want a note in the log to alert you about it, leave one of the question marks off. Kind regards, ================= Paul M. Dorfman Jacksonville, FL ================= >From: Igor Kurbeko <ikurbeko@ATHEROGENICS.COM> >Reply-To: Igor Kurbeko <ikurbeko@ATHEROGENICS.COM> >To: SAS-L@LISTSERV.UGA.EDU >Subject: if str_mo not in ('','.') and str_da not in ('','.') and str_yy > not in ('','.') Any shorter ? >Date: Wed, 22 Oct 2003 17:13:37 -0400 > >Hi, there. > > > >I'm just curious if it ever dawned on anybody how to abbreviate this >line : > >if ... Is there a 'break' or 'continue' in 'Do Unitl'... 'Loop'? If some condition is met, I would like to move to the next record. I tried 'Exit Do', which exits, this is not what i want; i tried 'break' or 'continue loop', none of them works. so, now i used a label with GoTo clause. I am just wondering what is the correct syntax? Thanks, ming swingingming wrote: > If some condition is met, I would like to move to the next record. I > tried 'Exit Do', which exits, this is not what i want; i tried 'break' > or 'continue loop', none of them works. so, now i used a label with > GoTo clause. > I am just wondering what is the correct syntax? > Thanks, ming > The exit do is the correct syntax. Or you can have the same or a different condition itself in the do while statement. For example, the following is building a string, strRoute (for a list of hexes along a straight line in a hexagonal overlay of a map): Do While intCount <= Abs(dy) lngY = lngY + Sgn(dy) lngx = lngx + Sgn(dy) strRoute = strRoute & "," & lngY & "-" & lngx & "," & lngY & "-" & lngx - Sgn(dy) intCount = intCount + 1 If intCount > Abs(dy) Then Exit Do lngY = lngY + Sgn(dy) strRoute = strRoute & "," & lngY & "-" & lngx intCount = intCount + 1 Loop The exit do ... Like '' & '' & '' Having this description column in a table "Cookies, peanut butter sandwich, regular" When using this WHERE clause: WHERE (((Food_Data.Description) Like "*Butter*" & "*Peanut*")); I dont get any results, however when using it this way round WHERE (((Food_Data.Description) Like "*Peanut*" & "*Butter*")); I get the row as expected. I assume that the query looks for them in order. Is there a way i can get around this and make the query search for both keywords no matter which order i ype them in. Thanks Dave [posted and mailed] SkunkDave (dave_casserly@totalise.co.uk) writes: > Having this description column in a table > > "Cookies, peanut butter sandwich, regular" > > > When using this WHERE clause: > > WHERE (((Food_Data.Description) Like "*Butter*" & "*Peanut*")); > > I dont get any results, however when using it this way round > > WHERE (((Food_Data.Description) Like "*Peanut*" & "*Butter*")); > > I get the row as expected. > > I assume that the query looks for them in order. The query looks for a string that matches the pattern "*Peanut**Butter*", so obviously it's not going to match "Butter Peanut". As suggested by Harald Albrech this works: WHERE (Food_Data.Description Like "*Butter*" or Food_Data..Description Like "*Peanut... We Are Selling The Samsung D500 For Just$189usd'''''''''
Dear Customer We have all brands of Mobile Phones,Ipods,Sidekicks,Nextel phone,Laptops for sell at cheap an affordable prices, they ranges from Nokia/Samsung/LG/Son Ericsson/Motorola/Alcatel/panasonic With Bluetooth, al Brands and Models of Nextel Phones, we want you to get bac to us with your quote so that we can begin a good busines relationship. Note they are all Brand New T2 Euro specs unlocked, no operator logo, come in thei original sealed box, With 1 year international warrant from the manufacturer, English & Spanish manual, Finlan made We want to assure you that you will never regret buyin from us because the delivery will be to your doorstep vi FedEx Courier service.And the Tracking number shall be sen to you upon acknowledgement of your payment Kindly acknowledge the reciept of our mail and get back t us at mobiledealer_ltd@yahoo.co -- lolasam ...

Re: if str_mo not in ('','.') and str_da not in ('','.') and str_ yy not in ('','.') Any shorter ? #4
Igor, Without robust error checking: %macro check ( vars , values , op = in /* not in */, con = and /* or */ ) ; %local i w ; %let i = 1 ; %let w = %scan(&vars,&i) ; %do %while ( %length ( &w ) > 0 ) ; %if &i > 1 %then &con ; &w &op &values %let i = %eval ( &i + 1 ) ; %let w = %scan(&vars,&i) ; %end ; %mend check ; option mprint ; data w ; retain x y z "a" r " " s t "a" a b 99 c . ; if %check( x y z , ('','.'), op = not in ) then put "Igor" ; else put "Problem some x y or z are bad" ; if %check( r s t , ('','.'), con = or ) then put "Problem some r s or t are bad" ; if %check ( a b c , ( . 99) ) then put "Problem all a b and c are bad numerics" ; run ; I am sure there is code something like this in the archives but do not want to find it. IanWhitlock@westat.com -----Original Message----- From: Igor Kurbeko [mailto:ikurbeko@ATHEROGENICS.COM] Sent: Wednesday, October 22, 2003 5:14 PM To: SAS-L@LISTSERV.UGA.EDU Subject: if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.') Any shorter ? Hi, there. I'm just curious if it ever dawned on anybody how to abbreviate this line : if str_mo not in ('','.') and str_da not in ('','.&#...

Web resources about - Issue with the 'script' command in users '.kshrc' and '.bashrc' files - comp.unix.shell

Resources last updated: 3/29/2016 2:20:38 AM