Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Can we get every tuesday or monday's date for the current week Post 302506555 by Franklin52 on Monday 21st of March 2011 07:30:19 AM
Old 03-21-2011
Another approach to print the monday of the current week:
Code:
cal | 
awk -v d="$(date +"%m %d %y")" 'BEGIN{split(d,a)} $0 ~ int(a[2]) {print a[1] $2 a[3]}'

For the tuesday you can replace $2 with $3 etc.
This User Gave Thanks to Franklin52 For This Post:
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Getting week number of the "Monday"

Hi Friends, Can you help me with this, I would like to get the week number of the "Monday", Say if we run on first week of november it should give me output as "05" and "10" i.e it says the monday falls on 5th week of october. If we run on the second week of november it should give me "01"... (8 Replies)
Discussion started by: sbasetty
8 Replies

2. UNIX for Dummies Questions & Answers

I wanted to get the date of the first monday of a month.

Hi, I need to display the date of the first monday of a month. Can any one please help me on this. Thanks in advance. (6 Replies)
Discussion started by: Sheethal
6 Replies

3. UNIX for Advanced & Expert Users

Extract Monday from given date

Hi I want to extract the date on Monday depending upon the user input for that week. For example if the input date is 20080528 then the output should be 20080526. If the input is 20080525 then it will be 20080519 i am working on IBM AIX Thanks (2 Replies)
Discussion started by: itsme_maverick
2 Replies

4. Shell Programming and Scripting

Get the date of monday when running from Friday to next Thursday

Hi, I have a requirement where I want to get the date of monday when I am running the script from previous Friday to the following Thursday. For example: When ever I run the script between 19thFeb2010(Friday) to 25th Feb 2010(Thursday), I should get the date of 22nd Feb 2010 in the format of... (5 Replies)
Discussion started by: fasiazhar_411
5 Replies

5. Shell Programming and Scripting

Date One Week Ago From Given Date, Not From Current Date

Hi all, I've used various scripts in the past to work out the date last week from the current date, however I now have a need to work out the date 1 week from a given date. So for example, if I have a date of the 23rd July 2010, I would like a script that can work out that one week back was... (4 Replies)
Discussion started by: Donkey25
4 Replies

6. Shell Programming and Scripting

Get Date of Previous and next Monday

Hi, I would like to know how to get Previous Monday and Next Monday from the current date.. thanks (5 Replies)
Discussion started by: balasubramani04
5 Replies

7. Shell Programming and Scripting

Can we get Tuesday's date of the current week in UNIX

Hi All, I have a requirement which would calculate the Tuesday's date of the current week in yyyymmdd format in unix shell script. Please help me out how could I do this . I appreciate your help Regards, raj (7 Replies)
Discussion started by: rajeevm
7 Replies

8. Shell Programming and Scripting

Obtain date for first Tuesday of every month

Hi , Please help me out to write a shell script to obtain the date of first tueday of every month. I am new to shell scripting. Appreciate your help Thanks. (7 Replies)
Discussion started by: prongs22
7 Replies
set_color(1)							       fish							      set_color(1)

NAME
set_color - set_color - set the terminal color set_color - set the terminal color Synopsis set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR] Description Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple, cyan, white and normal. o -b, --background Set the background color o -c, --print-colors Prints a list of all valid color names o -h, --help Display help message and exit o -o, --bold Set bold or extra bright mode o -u, --underline Set underlined mode o -v, --version Display version and exit Calling set_color normal will set the terminal color to whatever is the default color of the terminal. Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey font color, while set_color --bold white will result in a white font color. Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator. set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of ncurses and recompile fish against it in order to fix this issue. Version 1.23.1 Sun Jan 8 2012 set_color(1)
All times are GMT -4. The time now is 08:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy