I want to get day from the current system date


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers I want to get day from the current system date
# 1  
Old 06-24-2005
I want to get day from the current system date

Hi,

I want to check what day is today (like mon,Tue,wed)
When i checked the syntax, i dont see there is a format specifier for getting the day. Let me know how to get the same.

I am very new to unix and so I am asking some basic questions.

cheers,
gops
# 2  
Old 06-24-2005
Check out this command

date '+%a'

this will return the current day.

Their are other options too. Check out the man page of date command
# 3  
Old 06-24-2005
Thanks Amit for your input. It is working fine
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to get first & last day of a month from current date?

Hi, I need the first & last day of a month from any given date. For better understanding, if i need to back-fill data for date 07/20/2019 i.e July 20 2019, i need the first & last day has 07/01/2019 - 07/31/2019. FYI: I'm using GIT BASH terminal. sample code: export DT=$(date --date='6 days... (2 Replies)
Discussion started by: Rocky975583
2 Replies

2. UNIX for Beginners Questions & Answers

Replace date in file every day with current date

I Have text like XXX_20190908.csv.gz need to replace Only date in this format with current date every day Thanks! (1 Reply)
Discussion started by: yamasani1991
1 Replies

3. Shell Programming and Scripting

[Solved] How to tar data along with current system date and time.?

Hi all, Following is my small script:- #!/bin/ksh for i in `cat /users/jack/mainfile-dr.txt` do sudo cp -r $i /users/jack/DR01/. done cd /users/jack/DR01/ sudo tar cvf system1-DR.tar * scp system1-DR.tar backupserver:/DRFiles/system1 sudo rm -rf system1-DR.tar In this script I... (10 Replies)
Discussion started by: manalisharmabe
10 Replies

4. UNIX for Dummies Questions & Answers

Move the files between Current day & a previous day

Hi All, I have a requirement where I need to first capture the current day & move all the files from a particular directory based on a previous day. i.e move all the files from one directory to another based on current day & a previous day. Here is what I am trying, but it gives me errors.... (2 Replies)
Discussion started by: dsfreddie
2 Replies

5. UNIX for Dummies Questions & Answers

Comparing Output Date to Current System Date

Hi Guys, Anyone who knows how to compare the current date with the a file containing a date, say for example I have a file that looks like this: Command was launched from partition 0. ------------------------------------------------ Executing command in server server6 Fri Dec 16... (7 Replies)
Discussion started by: rymnd_12345
7 Replies

6. UNIX for Dummies Questions & Answers

Delete a row from a file if one column containing a date is greater than the current system date

Hello gurus, I am hoping someone can help me with the required code/script to make this work. I have the following file with records starting at line 4: NETW~US60~000000000013220694~002~~IT~USD~2.24~20110201~99991231~01~01~20101104~... (4 Replies)
Discussion started by: chumsky
4 Replies

7. Shell Programming and Scripting

Get current day on Julian date format

Hi guys, I know if I try to get a julian date using a specific date I can but I try to get the current date I got an error as you can see below: This one works fine: date -d "2010/10/30" +%j But I can't get the current date as below: `date -d "+%Y/%m/%d`" +%j Does somebody can... (6 Replies)
Discussion started by: edudiogo
6 Replies

8. Shell Programming and Scripting

how to get what date was 28 days ago of the current system date IN UNIX

Hi, Anybody knows how to get what date was 28 days ago of the current system date through UNIX script. Ex : - If today is 28th Mar 2010 then I have to delete the files which arrived on 1st Mar 2010, (15 Replies)
Discussion started by: kandi.reddy
15 Replies

9. UNIX for Dummies Questions & Answers

Current system date in terms of seconds

Hello Friends, I've been struggling with extreme nagios passive service checks. In order to trigger a nagios passive service im going to write an easy shell script like below and will run it in crontab. As im working on Solaris 10 servers i used "S" instead of lowercase "s" below #!/bin/sh... (2 Replies)
Discussion started by: EAGL€
2 Replies

10. UNIX for Dummies Questions & Answers

get current system date

How do I create a shell script that would get the current system date in format of yyyymmdd and use that result to concatenate it to a filename that it would look like this: sample20051024.dat example -------- current system date: 24-Oct-2005 filename: sample.dat when the shell script... (5 Replies)
Discussion started by: wtolentino
5 Replies
Login or Register to Ask a Question