02-14-2010
Thank you very much! What a stupid mistake... :-)
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
When I execute this line at the command prompt I get a different answer than when I run it in a script? Any ideas on how to resolve? I'm trying to find all files/dir in a directory except files that start with the word file.
Once I get this command to work, I will add the "delete" part to the... (6 Replies)
Discussion started by: blt123
6 Replies
2. UNIX for Dummies Questions & Answers
Is there a command where I can pipe my grep into it and it will output it with spaces rather than returns?
Example
I want to turn
prompt$ grep blah file
blah
blah
into this
prompt$ grep blah file | someCommand
blah blah (1 Reply)
Discussion started by: mrwatkin
1 Replies
3. UNIX for Dummies Questions & Answers
Hello,
I looking to use grep to return a string with exactly n matches.
I'm building off this:
ls -aLl /bin | grep '^.\{9\}x' | tr -s ' '
-rwxr-xr-x 1 root root 632816 Nov 25 2008 vi
-rwxr-xr-x 1 root root 632816 Nov 25 2008 view
-rwxr-xr-x 1 root root 16008 May 25 2008... (7 Replies)
Discussion started by: MykC
7 Replies
4. Shell Programming and Scripting
my intension is to use a grep command inside the shell script
and if any row is returned or not..
depending on the resultset i have to code on further.
how to check this
i mean.. could anyone help me out with the if condition how to use it here !! (4 Replies)
Discussion started by: gotam
4 Replies
5. Shell Programming and Scripting
Hi all,
I am trying to grep a .txt file for a word. When I hit enter, it returns back to $
The file is 4155402 in size and is named in this way:
*_eveningtimes_done_log.txt
I use this command, being in the same directory as the file:
grep -i "invalid" *_eveningtimes_done_log.txt
... (16 Replies)
Discussion started by: DallasT
16 Replies
6. Shell Programming and Scripting
I’m trying to modify someone perl script to fix a bug. The piece of code checks that the zone name you want to add is unique. However, when the code runs, it finds a partial match using grep, and decides it already exists, so the “create” command exits.
$cstatus = `${ZADM} list -vic | grep... (3 Replies)
Discussion started by: TKD
3 Replies
7. UNIX for Dummies Questions & Answers
I get an error when I grep my results into a variable when the grep finds more than one file.
FND="$(find ediout* -mmin -60)"
if ; then
STR="$(find ediout* -mmin -60 -exec grep -l "ERRORS Encountered" {} +)"
fi
When there is only one ediout file it works fine. How do I... (11 Replies)
Discussion started by: aispg8
11 Replies
8. Shell Programming and Scripting
Hi all. I am trying to compare and filter two files. I have a bigfile.txt of names and ids and a smallfile.txt of ids only. What I am trying to do is use a while read loop to read the ids in the bigfile and then echo the name and id only if the id exists in the small file. Basically, I'm trying to... (5 Replies)
Discussion started by: jameswatson3
5 Replies
9. Shell Programming and Scripting
Hi Gurus.
This is driving me a bit batty. I now if must be a simple matter but I cant find anything that references it.
I have a housekeeping script that searches for some huge dump directories then removes them using rm -rf.
find ./ -name 'ab' -exec rm -rf {} \;
This works but always... (7 Replies)
Discussion started by: rinser
7 Replies
10. UNIX for Beginners Questions & Answers
Under one of my directories on server I have more than 500 files with different type and name. When I run the find command to list the files with 'ABC_DEFGH' in the begining of its name and older than 20 days, nothing is return as result. Though I know there are more than 400 files which their name... (10 Replies)
Discussion started by: Home
10 Replies
YASAT(8) YASAT 526 YASAT(8)
NAME
YASAT - simple stupid audit tool
SYNOPSIS
yasat [--standard(-s)] [--list(-l)] [--debug(-d)] [--help(-h)] [--html(-H)] [--html-output PATH] [--advice-lang LANG] [--full-scan(-f)]
[--plugins-dir(-P) PATH] [--nopause(-a)] [--plugin(-1) PATH] [--Plugin(-p) NAME] [--print-level X] [--check-update]
DESCRIPTION
YASAT (Yet Another Stupid Audit Tool) is a simple stupid audit tool. Its goal is to be as simple as possible with minimum binary dependen-
cies (only sed, grep and cut) Second goal is to document each test with maximum information and links to official documentation. It do
many tests for checking security configuration issue or others good practice.
It checks many software configurations like: Apache, Bind DNS, CUPS, PHP, kernel configuration, mysql, network configuration, openvpn,
Packages update, samba, snmpd, squid, tomcat, user accounting, vsftpd, xinetd,
OPTIONS
--standard (or -a)
YASAT will performs a standard check of the system, printing out the results of each test to stdout. A log is also created in
~/.yasat/yasat.result by default
--list (or -l)
List all plugins available
--html (or -H)
YASAT will export results in html (default to ~/yasat/yasat.html)
--html-output PATH
With -H, this option permit to change the file where to store html output.
--advice-lang LANG
By default, YASAT print message in english (EN), you can change the displayed lang with this option. LANG is the 2letter digit of
the lang you want. For the moment only EN is supported.
--full-scan (or -f)
YASAT will do extra (long) tests (lots of find).
--plugins-dir PATH (or -P)
Set the path where YASAT can find plugins to use. (default is ./plugins )
--nopause (or -a)
By default, YASAT made a pause after each plugin. For automatize tests you can use this.
--plugin PATH (or -1)
YASAT will just use the plugin pointed by PATH (ex: yasat -1 kernel)
--print-level x (or -1)
YASAT will print infos equal or above the level X (All = 0 (default), infos = 1 warnings(orange) = 2, errors(red) = 3
--skip TEST
A comma separated list of tests to skip without the .test (ex: --skip nfs,ntp). See yasat --list for all tests.
--check-update
Check if an update of YASAT exists
--send-support
Like --check-update, but it will send also as parameter your OS version for statistics. In the future, perhaps also a sort of
send_bugs.
LICENSING
YASAT is licensed under the GPL v3 license and under development by LABBE Corentin.
CONTACT INFORMATION
All contacts informations could be found at http://yasat.sourceforge.net/
526 21 May 2012 YASAT(8)