Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.
How to negate a regexp with 'ls'
Name: goflyboy Date: August 4, 2005 at 20:23:08 Pacific OS: Windows XP CPU/Ram: AMD 2Ghz / 1Gb
Comment:
I need to negate a regular expression using a syntax compatible with the 'ls' command (That is, I can not use awk, sed, grep, or perl).
Example: Let's say I want to return a list of all filenames that are not named "MYFILE".
Background: Actually, I need to use this command with Matlab's "clear" command to wipe out all variables except for one or two counters I need to preserve.
Summary: how to write a shellscript which can do that. That display on the screen -how many user logged in -newlogins since last sample -who has logged out since las sample -how many processe started since...