bash date variable format
Shell
# Source: https://www.tutorialkart.com/bash-shell-scripting/bash-date-format-options-examples/
date '+<format-option><format-option> <format-option>'
# For example:
echo $(date '+%A')
date=$(date '+%A')
# Formats:
# date +%a Weekday Name of weekday in short (like Sun, Mon, Tue, Wed, Thu, Fri, Sat) Mon
# date +%A Weekday Name of weekday in full (like Sunday, Monday, Tuesday) Monday
# date +%b Month Name of Month in short (like Jan, Feb, Mar ) Jan
# date +%B Month Month name in full short (like January, February) January
# date +%d Day Day of month (e.g., 01) 04
# date +%D MM/DD/YY Current Date; shown in MM/DD/YY 02/18/18
# date +%F YYYY-MM-DD Date; shown in YYYY-MM-DD 2018-01-19
# date +%H Hour Hour in 24-hour clock format 18
# date +%I Hour Hour in 12-hour clock format 10
# date +%j Day Day of year (001..366) 152
# date +%m Month Number of month (01..12) (01 is January) 05
# date +%M Minutes Minutes (00..59) 52
# date +%S Seconds Seconds (00..59) 18
# date +%N Nanoseconds Nanoseconds (000000000..999999999) 300231695
# date +%T HH:MM:SS Time as HH:MM:SS (Hours in 24 Format) 18:55:42
# date +%u Day of Week Day of week (1..7); 1 is Monday 7
# date +%U Week Displays week number of year, with Sunday as first day of week (00..53) 23
# date +%Y Year Displays full year i.e. YYYY 2018
# date +%Z Timezone Time zone abbreviation (Ex: IST, GMT) IST
Also in Shell:
- Title
- chmode ubuntu
- Category
- Shell
- Title
- change remote repository git
- Category
- Shell
- Title
- how to create a new group in linux
- Category
- Shell
- Title
- linux find file
- Category
- Shell
- Title
- import jar file
- Category
- Shell
- Title
- git flow init
- Category
- Shell
- Title
- gatsby image
- Category
- Shell
- Title
- increase open file limit linux mac catalina mariadb
- Category
- Shell
- Title
- too many security failures vnc
- Category
- Shell
- Title
- golang compile with injected variable
- Category
- Shell
- Title
- upgrade node version
- Category
- Shell
- Title
- webpack install
- Category
- Shell
- Title
- netstat command in linux
- Category
- Shell
- Title
- git rename branch
- Category
- Shell
- Title
- install magento 2 command line composer
- Category
- Shell
- Title
- how to upgrade package yarn global
- Category
- Shell
- Title
- create github repo with bash
- Category
- Shell
- Title
- how to update pip in linux
- Category
- Shell
- Title
- git reset soft
- Category
- Shell
- Title
- tree process linux commnad
- Category
- Shell
- Title
- laravel create controller
- Category
- Shell
- Title
- git bash Could not open a connection to your authentication agent. when adding ssh
- Category
- Shell
- Title
- ignore .DS_store when uploading to s3 using shell
- Category
- Shell
- Title
- ubuntu check ssh login log
- Category
- Shell
- Title
- loop from array bash
- Category
- Shell
- Title
- checking for existing ssh keys
- Category
- Shell
- Title
- intall docker ubuntu command
- Category
- Shell
- Title
- git grep across all branches
- Category
- Shell
- Title
- generate ssh key paitr
- Category
- Shell
- Title
- find exclude hidden files
- Category
- Shell
- Title
- powershell command line variables
- Category
- Shell
- Title
- shared folder virtualbox ubuntu
- Category
- Shell
- Title
- kill a port
- Category
- Shell
- Title
- cosmicjs
- Category
- Shell
- Title
- avalible ios simulators
- Category
- Shell
- Title
- how to create folder in github
- Category
- Shell
- Title
- git add gitignore
- Category
- Shell
- Title
- xampp linux
- Category
- Shell
- Title
- git see tags
- Category
- Shell
- Title
- install ip addr on ubuntu
- Category
- Shell
- Title
- set git origin
- Category
- Shell
- Title
- parameter powershell
- Category
- Shell
- Title
- install poetry
- Category
- Shell
- Title
- Macbook git user config global
- Category
- Shell
- Title
- git init repo
- Category
- Shell
- Title
- comment in shell script
- Category
- Shell
- Title
- latex number listing as equation
- Category
- Shell
- Title
- windows subsystem for linux optional component is not enabled. please enable it and try again
- Category
- Shell
- Title
- kill a process at a port
- Category
- Shell
- Title
- git commit ignore eslint
- Category
- Shell
- Title
- how to delete files in linux
- Category
- Shell
- Title
- macos read ext4
- Category
- Shell
- Title
- split large file into smaller files
- Category
- Shell
- Title
- hash bang bash
- Category
- Shell
- Title
- deploy to heroku
- Category
- Shell
- Title
- find out a branch a parent branch git
- Category
- Shell
- Title
- loop through directories bash
- Category
- Shell
- Title
- NotImplementedError: OpenSSH keys only supported if ED25519 is available net-ssh requires the following gems for ed25519 suppor
- Category
- Shell
- Title
- get local node version
- Category
- Shell
- Title
- which shell query displays all citizens with an age greater than or equal to 21
- Category
- Shell
- Title
- linux vim set tab to 4 spaces
- Category
- Shell
- Title
- create a screen screen session tmux
- Category
- Shell
- Title
- javascript execute powershell script
- Category
- Shell
- Title
- git change remote origin address
- Category
- Shell
- Title
- linux c++ from console
- Category
- Shell
- Title
- git return from detached head
- Category
- Shell
- Title
- pip install crispy_forms
- Category
- Shell
- Title
- install express globally
- Category
- Shell
- Title
- compress folder ubuntu
- Category
- Shell
- Title
- bash get current date
- Category
- Shell
- Title
- npm list global packages
- Category
- Shell
- Title
- remove all files with no extention rm
- Category
- Shell
- Title
- bash find file with text
- Category
- Shell
- Title
- move a branch back in git
- Category
- Shell
- Title
- installing caddy server in ubuntu 18
- Category
- Shell
- Title
- kubectl copy secret namespace
- Category
- Shell
- Title
- powershell foreach
- Category
- Shell
- Title
- serverless invoke sqs
- Category
- Shell
- Title
- grep ip address
- Category
- Shell
- Title
- installing helm and tiller on minikube
- Category
- Shell
- Title
- grep ignore case
- Category
- Shell
- Title
- createa. branch off of development git
- Category
- Shell
- Title
- kill all screen sessions linux
- Category
- Shell
- Title
- install terminator in ubuntu
- Category
- Shell
- Title
- terminal delete directory not empty
- Category
- Shell
- Title
- undo git add
- Category
- Shell
- Title
- kernel headers were not found vmware kali linux
- Category
- Shell
- Title
- mac cleanup github
- Category
- Shell
- Title
- offline heic to jpg converter on linux
- Category
- Shell
- Title
- install google client api individually
- Category
- Shell
- Title
- bash display items in array
- Category
- Shell
- Title
- how to run a create-react-app server
- Category
- Shell
- Title
- assign default value in shell script
- Category
- Shell
- Title
- linux create file
- Category
- Shell
- Title
- git abort stash pop
- Category
- Shell
- Title
- brew install ruby
- Category
- Shell
- Title
- ubuntu dns server
- Category
- Shell
- Title
- git delete empty directory
- Category
- Shell
- Title
- bash copy
- Category
- Shell
- Title
- powershell get arguments
- Category
- Shell