i modified your script to this:
/usr/xpg4/bin/awk -F':' '$3>100&&$1!~/nobody/||$3==0{gsub("\\..*|/.*/","",FILENAME);print FILENAME";"$0}' *.pass > userreport.csv
i want to keep accounts with nologin, but i want to skip some exact accounts like "nobody". How can i add more users that i want to discard.
So for example, output will be users with uid>100,uid=0, but except users (nobody,sshd and snmp).
Thank you ver ymuch for another help and have a nice day.
Lukas
Hi, I have a input file like this
TH2TH2867Y NOW33332106Yo You Baby
TH2TH3867Y NOW33332106No Way Out
TH2TH9867Y NOW33332106Can't find it
TJ2TJ2872N WOW33332017sure thing alas
TJ2TJ3872N WOW33332017the sky rocks
TJ2TJ4872N WOW33332017nothing else matters ... (4 Replies)
I don't necessary have a problem, as I have a solution. It is just that there may be a better solution.
GOAL: Part one: Parse data from a file using the "\" as a delimiter and extracting only the last delimiter. Part two: Parse same file and extract everything but the last delimited item.
... (8 Replies)
Hi, I am searching for a fast awk hack to eliminate from an ICS file events which have been modified at a certain time.
The structure for parsing is the following:
BEGIN:VEVENT
....
LAST-MODIFIED:...some date...
...
END:VEVENT
If the date matches for example LAST-MODIFIED:20110823 the... (2 Replies)
i am parsing te /etc/passwd file and extracting the login and names alone.
But for some entries only login exist but no name. so i dont want to display those:
how i can check non emptiness for login and name in single if statement:
#!/usr/bin/bash
while IFS=: read login a b c name e
do
... (3 Replies)
Hi,
I have a data set as shown below:
09e757fd,22727,2012-03-01,text1,text2,to
3fd0cae7,310,2012-03-01,text3,text4,to
3fd0cae7,310,2012-03-01,text3,text5,to
3fd0cae7,311,2012-03-01,text7,text10,cc
3fd0cae7,311,2012-03-01,text7,text11,to
3fd0cae7,312,2012-03-01,text8,text15,to... (3 Replies)
I've got a number of RHEL systems and I'm trying to use awk to read and format the output of /etc/passwd. But I'd like to display the host name of the system at the beginning of each line of output.
I've got it working without the adding the host name in this script:
#!/bin/bash
... (3 Replies)
Looking to parse a file to remove the duplicates and get only few fields and uniq rows.
input.tx
Loc (TC) ID : ssfad_fs
Serial : PIC002340098
... (8 Replies)
I have a command to print out the top 5 most cpu intensive commands:
ps aux --sort=-%cpu --no-headers
I would like to make a printout containing only the parsed file name.
So, I want to turn this:
$ ps aux --sort=-%cpu --no-headers
user 24883 4.3 1.7 2010436 131440 ? Sl ... (2 Replies)
Discussion started by: bedtime
2 Replies
LEARN ABOUT DEBIAN
brandy
BRANDY(1) BBC BASIC V interpreter BRANDY(1)NAME
brandy - a portable BBC BASIC V interpreter
SYNOPSIS
brandy [-help] [-size SIZE] [-lib FILENAME] [-load FILENAME] [-path DIRECTORY[,DIRECTORY]...] [-quit FILENAME] [-chain FILENAME] [-ignore]
[FILENAME]
DESCRIPTION
Brandy is an interpreter for BBC BASIC V, the dialect of BASIC that Acorn Computers supplied with their ranges of desktop computers that
use the ARM processor such as the Archimedes and Risc PC, and is still in use on these and compatibles.
BASIC V is a much extended version of BBC BASIC. This was the BASIC used on the 6502-based BBC Micro that Acorn made during the 1980s.
OPTIONS -help Print a summary of these options.
-size SIZE
Set the size of the Basic workspace to SIZE bytes when starting the interpreter. The minimum size allowed is 10000 bytes and any-
thing below this value will be set to it. The maximum size is limited only by the environment in which the program is being run. The
size may have a suffix of k to denote that the size is in kilobytes or m if it is in megabytes. For example, -size 100k will set the
workspace size to 100 kilobytes (102400 bytes) and -size 8m will set it to eight megabytes (8388608 bytes).
-lib FILENAME
Load Basic library FILENAME when the interpreter starts. This option can be repeated as many times as required to load a number of
libraries. This is equivalent to typing INSTALL "FILENAME" at the interpreter's command line. The libraries are loaded in the order
given on the command line. Note that the search order is the reverse of this.
-load FILENAME
Load Basic program FILENAME when the interpreter starts.
-path DIRECTORY[,DIRECTORY]...
This specifies a list of directories that the interpreter will search when looking for libraries and programs. The directory names
are separated by commas. The pseudo-variable FILEPATH$ is set to this value.
-quit FILENAME
Load and run the Basic program FILENAME. Leave the interpreter when the program has finished running.
-chain FILENAME
Load and run the Basic program FILENAME. Remain in the interpreter when the program has finished running.
-graphics
Start the interpreter with the screen in graphics mode in versions of the program which support graphics and the screen can be in
either text or graphics modes.
-ignore
Ignore certain `unsupported feature' errors. By default the interpreter reports an error whenever it comes across a BASIC V feature
that it does not support. This option allows some unsupported features that do not affect the basic running of the program to be
ignored.
FILENAME
This is exactly equivalent to -chain.
The case of the names of the options is ignored. It depends on the operating system under which the interpreter is running as to whether
the names of files are case sensitive or insensitive.
FILES
brandy executable
/usr/share/doc/brandy/examples
example BASIC programs
SEE ALSO
/usr/share/doc/brandy full documentation
Brandy's home page
http://jaguar.orpheusweb.co.uk/branpage.html
There is some very useful documentation for the BBC Micro available on the Internet. One very good site is The BBC Lives! at:
http://www.nvg.ntnu.no/bbc/
or see http://sourceforge.net/projects/brandy/
AUTHOR
David Daniels, with contributions from Darren Salt and Colin Tuckley
REPORTING BUGS
Report bugs to the bug tracker at http://sourceforge.net/projects/brandy
COPYRIGHT
Copyright (c) 2000, 2001 David Daniels. Copyright (c) 2009, 2012 Colin Tuckley. This is free software; see the source for copying condi-
tions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
brandy 1.20pre5 10 Jun 2012 BRANDY(1)