Satisfy my curiosity, I am assuming this is Python 3.x.x code.
if it is then how did you get this section to work at all without a major traceback error?
Last edited by wisecracker; 06-26-2018 at 01:54 PM..
Hi,
I have a sheel script that invokes a perl script...Now, instead havin the perl script as a separate file I'd like put the contents in the sheel script itself...But I am not sure how ro run that perl script contents.please help me
Thanks (1 Reply)
The java program is a part of speech tagger -> The Stanford NLP (Natural Language Processing) Group
The goal is to use this script as part of a webpage to tag parts of speech based on a user-inputted string.
I have no idea what to do with the files - I'm a complete *nix noob. I tried running... (4 Replies)
Is there a way to run some code in a C-shell script by different shell, like bash?
I have that situation.
I have prepared and perfectly workable bash-skript that now I have to execute under C-shell script, divide it on steps and without creating a new files (with the bash-code parts.)
For... (6 Replies)
Hi there can anyone help me
here is my code
echo "Type in a positive number"
read X
I=2
while
do
if
then
echo "It is not prime"
break
else
if
then
echo "It is prime"
break
else
I=$(( $I + 1))
fi
fi (4 Replies)
hi All,
Am newbie to unix and would require your help to complete this task.
Condition:
I have a server start up script and I would like to append the code in such a way that it searches for a phrase "process completed" in taillog when server starts up and also should run another script... (9 Replies)
I am more of a newbie, but wanted to post this in this forum as I was afraid no one would look at it in unix forums as it concerns shell scripting. I have a shell script that now runs fine with the exclusion of one line:
x=`su nbadmin -c "ssh -t servery /usr/openv/netbackup/bin/bplist -C... (7 Replies)
If I run 'who -u' interactively or from a script invoked through bash in a tty on my Ubuntu 12LTS box I get an output like this:
testuser pts/0 Dec 9 02:32 . 2163 (host.xx.yy)
running the same through cron I get:
testuser pts/0 2012-12-09 02:32 00:05 2163... (2 Replies)
Hi,
I want to deploy a (perl) script, in Linux. (Red Hat 7).
Is there a way to protect the script itself from being viewed by the user, but still allow the user to run the script?
I dont want the user to be able to see the source code of the script. (2 Replies)
Some hackers found a security hole in macOS High Sierra and tweeted it to the world before telling Apple about the problem. You can see the details from PC Magazine's daily news here: Apple Releases Fix for MacOS High Sierra 'Root' Bug. The original story this morning was published before a patch... (6 Replies)
Discussion started by: Don Cragun
6 Replies
LEARN ABOUT POSIX
last
LAST, LASTB(1) User Commands LAST, LASTB(1)NAME
last, lastb - show a listing of last logged in users
SYNOPSIS
last [options] [username...] [tty...]
lastb [options] [username...] [tty...]
DESCRIPTION
last searches back through the /var/log/wtmp file (or the file designated by the -f option) and displays a list of all users logged in (and
out) since that file was created. One or more usernames and/or ttys can be given, in which case last will show only the entries matching
those arguments. Names of ttys can be abbreviated, thus last 0 is the same as last tty0.
When catching a SIGINT signal (generated by the interrupt key, usually control-C) or a SIGQUIT signal, last will show how far it has
searched through the file; in the case of the SIGINT signal last will then terminate.
The pseudo user reboot logs in each time the system is rebooted. Thus last reboot will show a log of all the reboots since the log file
was created.
lastb is the same as last, except that by default it shows a log of the /var/log/btmp file, which contains all the bad login attempts.
OPTIONS -a, --hostlast
Display the hostname in the last column. Useful in combination with the --dns option.
-d, --dns
For non-local logins, Linux stores not only the host name of the remote host, but its IP number as well. This option translates the
IP number back into a hostname.
-f, --file file
Tell last to use a specific file instead of /var/log/wtmp. The --file option can be given multiple times, and all of the specified
files will be processed.
-F, --fulltimes
Print full login and logout times and dates.
-i, --ip
Like --dns , but displays the host's IP number instead of the name.
-number
-n, --limit number
Tell last how many lines to show.
-p, --present time
Display the users who were present at the specified time. This is like using the options --since and --until together with the same
time.
-R, --nohostname
Suppresses the display of the hostname field.
-s, --since time
Display the state of logins since the specified time. This is useful, e.g., to easily determine who was logged in at a particular
time. The option is often combined with --until.
-t, --until time
Display the state of logins until the specified time.
--time-format format
Define the output timestamp format to be one of notime, short, full, or iso. The notime variant will not print any timestamps at
all, short is the default, and full is the same as the --fulltimes option. The iso variant will display the timestamp in ISO-8601
format. The ISO format contains timezone information, making it preferable when printouts are investigated outside of the system.
-w, --fullnames
Display full user names and domain names in the output.
-x, --system
Display the system shutdown entries and run level changes.
TIME FORMATS
The options that take the time argument understand the following formats:
YYYYMMDDhhmmss
YYYY-MM-DD hh:mm:ss
YYYY-MM-DD hh:mm (seconds will be set to 00)
YYYY-MM-DD (time will be set to 00:00:00)
hh:mm:ss (date will be set to today)
hh:mm (date will be set to today, seconds to 00)
now
yesterday (time is set to 00:00:00)
today (time is set to 00:00:00)
tomorrow (time is set to 00:00:00)
+5min
-5days
NOTES
The files wtmp and btmp might not be found. The system only logs information in these files if they are present. This is a local configu-
ration issue. If you want the files to be used, they can be created with a simple touch(1) command (for example, touch /var/log/wtmp).
FILES
/var/log/wtmp
/var/log/btmp
AUTHOR
Miquel van Smoorenburg <miquels@cistron.nl>
AVAILABILITY
The last command is part of the util-linux package and is available from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-
linux/>.
SEE ALSO login(1), wtmp(5), init(8), shutdown(8)util-linux October 2013 LAST, LASTB(1)