≡ Menu

current date

I need to create a log file using the following format:

myapp_monday.log
myapp_tuesday.log
....
...
myapp_sunday.log

How do I create log filename with day of the week in it under Linux or Unix operating systems?
[click to continue…]

UNIX / Linux: Increment The Date

I want to increment the date under UNIX or Linux operating system while writing shell scripts. For example Apr/27/2011 should be incremented as Apr/28/2011 and so on. How do I increment a date in UNIX or Linux shell?
[click to continue…]

How do I get the current date in Unix or Linux shell scripting and store it into a shell variable? How do I print the current date using Unix shell script?
[click to continue…]

Linux / UNIX: TZ Environment Variable

What is the correct format for a TZ (time zone) environment variable for use with the Linux or UNIX operating system?
[click to continue…]

Bash Infinite Loop Examples

How do I write an infinite loop in Bash script under Linux or UNIX like operating systems?
[click to continue…]

VI / VIM: Insert Current Date / Time

How do I display and insert current date and/or time under vi or VIM text editor?
[click to continue…]

How do I execute a script under UNIX or Linux like operating system using command prompt?
[click to continue…]