Sponsored Content
Top Forums UNIX for Beginners Questions & Answers When I run the code yesterday I am getting output,when I run same code today I am getting error? Post 303019234 by haribabu2229 on Monday 25th of June 2018 02:59:05 PM
Old 06-25-2018
Code:
Strftime('%m%d%y')

I am giving like this
When I am trying to create date folder getting error.


Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 06-25-2018 at 04:28 PM.. Reason: Added CODE tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to run perl code within a shell script...?

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)
Discussion started by: vijay_0209
1 Replies

2. UNIX for Dummies Questions & Answers

Compile & Run Java Code

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)
Discussion started by: tguillea
4 Replies

3. Shell Programming and Scripting

HOW to run a bash-code in a c-shell script ??

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)
Discussion started by: alex_5161
6 Replies

4. UNIX for Dummies Questions & Answers

[Solved] Why code run not correctly

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)
Discussion started by: FUTURE_EINSTEIN
4 Replies

5. Shell Programming and Scripting

Code to search for a phrase and run a command

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)
Discussion started by: fop4658
9 Replies

6. UNIX for Advanced & Expert Users

[SOLVED] Code does not run when assigned to a variable

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)
Discussion started by: newbie2010
7 Replies

7. Shell Programming and Scripting

Who -u gives different output if run from cron than if run from terminal?

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)
Discussion started by: latimer
2 Replies

8. Shell Programming and Scripting

How to run a script, but not let user see code?

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)
Discussion started by: BG_JrAdmin
2 Replies

9. Shell Programming and Scripting

Bash code will not run

Why doesn't the code below run? Am I missing something? Thank you :). syntax() { printf "\n\n" printf "Enter HGVS description of variant(s): "; IFS="," read -a hgvs && printf "\n Nothijng entered. Leaving match function." && sleep 2 && return for ((i=0;... (5 Replies)
Discussion started by: cmccabe
5 Replies

10. OS X (Apple)

If you run macOS High Sierra version 10.13.1, be sure to install today's update.

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
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)
All times are GMT -4. The time now is 11:03 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy