Sponsored Content
Full Discussion: Day of variable ???????
Top Forums Shell Programming and Scripting Day of variable ??????? Post 96176 by barribar on Wednesday 18th of January 2006 09:48:55 AM
Old 01-18-2006
Day of variable ???????

Hello
I have a file like this:

06/01/01 name51 name42 .............
06/01/05 name31 name25 ..............
06/01/10 name13 name22 .............

How can I know if $1 ( 06/01/01 (y/m/d)) is MONDAY OR SANDAY etc ...

Tank you
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Write a shell script to find whether the first day of the month is a working day

Hi , I am relatively new to unix... Can u pls help me out to find out if the first day of the month is a working day ie from (Monday to Friday)...using Date and If clause in Korn shell.. This is very urgent. Thanks for ur help... (7 Replies)
Discussion started by: phani
7 Replies

2. Solaris

/var size is increasing day by day

Hi experts, I am facing a big problem. i use solaris 9. i found size of /var is increasing day by. snapshot of a yester moring- /dev/vx/dsk/var 15G 14G 1.1G 94% /var snapshot of a yesterday everning- /dev/vx/dsk/var 15G 14G 824M 95% /var I am... (11 Replies)
Discussion started by: thepurple
11 Replies

3. Shell Programming and Scripting

value of variable based on time of the day

i would need some help in setting the value of a variable (TIME_NOW) depending on the time of the day ...e.g. if today's date is 12th April 2009 and if the current time is between midnight and 16:59:59 hrs then the TIME_NOW should be yesterday's date i.e. TIME_NOW=11 else if the current time... (3 Replies)
Discussion started by: zainravi
3 Replies

4. Shell Programming and Scripting

Script to find previous month last day minus one day timestamp

Hi All, I need to find the previous month last day minus one day, using shell script. Can you guys help me to do this. My Requirment is as below: Input for me will be 2000909(YYYYMM) I need the previous months last day minus 1 day timestamp. That is i need 2000908 months last day minus ... (3 Replies)
Discussion started by: girish.raos
3 Replies

5. Solaris

May i know the day to day activities of a Solaris system administrator?

Recently i have attended a telephonic interview. As i dont have work experience in solaris i was not able to deliver correct answer for this question. Your answer will help for the people like me who is looking to become Solaris System administrator. (4 Replies)
Discussion started by: Sesha
4 Replies

6. Shell Programming and Scripting

Code creates day 32 instead of 1st day of next month.

I am using the code below modified from a post I saw here regarding having the script write out future dates. The problem is that instead of making 8/1 it makes 7/32! Please help! yy=`date +%Y` mm=`date +%m` dd=`date +%d` echo "Today is : $yy $mm $dd" #!/usr/bin/ksh date '+%m... (5 Replies)
Discussion started by: libertyforall
5 Replies

7. Shell Programming and Scripting

Script to check if last modified day is previous day

Hi, I would like to write a script that checks if a file ('counter') was modified the previous day, if so erase its contents and write 00000000 into it. For e.g. if the file 'counter' was last modified at 11.30pm on 24th May and the script runs at 12.15am of 25th May, it should erase it's... (1 Reply)
Discussion started by: hegdepras
1 Replies

8. 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

9. Shell Programming and Scripting

Get day from date variable

Ok...this is really bumming me out because it seems like it should be simple, but for some reason, I just can't get it...I've also googled and searched these forums, and haven't found exactly what I'm looking for... I have a date in mm/dd/yyyy format in a variable...I need to extract the... (7 Replies)
Discussion started by: dbiggied
7 Replies

10. Shell Programming and Scripting

Julian day to dates in YEAR-MONTH-DAY

hello, I have many files called day001, day002, day003 and I want to rename them by day20070101, day20070102, etc. I need to do it for several years and leap years as well. What is the best way to do it ? Thank you. (1 Reply)
Discussion started by: Ggg
1 Replies
MILLE(6)							   Games Manual 							  MILLE(6)

NAME
mille - play Mille Bornes SYNOPSIS
mille [ file ] DESCRIPTION
Mille plays a two-handed game reminiscent of the Parker Brother's game of Mille Bornes with you. The rules are described below. If a file name is given on the command line, the game saved in that file is started. When a game is started up, the bottom of the score window will contain a list of commands. They are: P Pick a card from the deck. This card is placed in the `P' slot in your hand. D Discard a card from your hand. To indicate which card, type the number of the card in the hand (or "P" for the just-picked card) followed by a RETURN or SPACE. The RETURN or SPACE is required to allow recovery from typos which can be very expensive, like dis- carding safeties. U Use a card. The card is again indicated by its number, followed by a RETURN or SPACE. O Toggle ordering the hand. By default off, if turned on it will sort the cards in your hand appropriately. This is not recommended for the impatient on slow terminals. Q Quit the game. This will ask for confirmation, just to be sure. Hitting DELETE (or RUBOUT) is equivalent. S Save the game in a file. If the game was started from a file, you will be given an opportunity to save it on the same file. If you don't wish to, or you did not start from a file, you will be asked for the file name. If you type a RETURN without a name, the save will be terminated and the game resumed. R Redraw the screen from scratch. The command ^L (control `L') will also work. W Toggle window type. This switches the score window between the startup window (with all the command names) and the end-of-game win- dow. Using the end-of-game window saves time by eliminating the switch at the end of the game to show the final score. Recommended for hackers and other miscreants. If you make a mistake, an error message will be printed on the last line of the score window, and a bell will beep. At the end of each hand or game, you will be asked if you wish to play another. If not, it will ask you if you want to save the game. If you do, and the save is unsuccessful, play will be resumed as if you had said you wanted to play another hand/game. This allows you to use the "S" command to reattempt the save. AUTHOR
Ken Arnold (The game itself is a product of Parker Brothers, Inc.) SEE ALSO
curses(3X), Screen Updating and Cursor Movement Optimization: A Library Package, Ken Arnold CARDS
Here is some useful information. The number in parentheses after the card name is the number of that card in the deck: Hazard Repair Safety Out of Gas(2) Gasoline(6) Extra Tank(1) Flat Tire(2) Spare Tire(6) Puncture Proof(1) Accident(2) Repairs(6) Driving Ace(1) Stop(4) Go(14) Right of Way(1) Speed Limit(3) End of Limit(6) 25 - (10), 50 - (10), 75 - (10), 100 - (12), 200 - (4) RULES
Object: The point of this game is to get a total of 5000 points in several hands. Each hand is a race to put down exactly 700 miles before your opponent does. Beyond the points gained by putting down milestones, there are several other ways of making points. Overview: The game is played with a deck of 101 cards. Distance cards represent a number of miles traveled. They come in denominations of 25, 50, 75, 100, and 200. When one is played, it adds that many miles to the player's trip so far this hand. Hazard cards are used to prevent your opponent from putting down Distance cards. They can only be played if your opponent has a Go card on top of the Battle pile. The cards are Out of Gas, Accident, Flat Tire, Speed Limit, and Stop. Remedy cards fix problems caused by Hazard cards played on you by your opponent. The cards are Gasoline, Repairs, Spare Tire, End of Limit, and Go. Safety cards prevent your opponent from putting spe- cific Hazard cards on you in the first place. They are Extra Tank, Driving Ace, Puncture Proof, and Right of Way, and there are only one of each in the deck. Board Layout: The board is split into several areas. From top to bottom, they are: SAFETY AREA (unlabeled): This is where the safeties will be placed as they are played. HAND: These are the cards in your hand. BATTLE: This is the Battle pile. All the Hazard and Remedy Cards are played here, except the Speed Limit and End of Limit cards. Only the top card is displayed, as it is the only effective one. SPEED: The Speed pile. The Speed Limit and End of Limit cards are played here to control the speed at which the player is allowed to put down miles. MILEAGE: Miles are placed here. The total of the numbers shown here is the distance traveled so far. Play: The first pick alternates between the two players. Each turn usually starts with a pick from the deck. The player then plays a card, or if this is not possible or desirable, discards one. Normally, a play or discard of a single card constitutes a turn. If the card played is a safety, however, the same player takes another turn immediately. This repeats until one of the players reaches 700 points or the deck runs out. If someone reaches 700, they have the option of going for an Extension, which means that the play continues until someone reaches 1000 miles. Hazard and Remedy Cards: Hazard Cards are played on your opponent's Battle and Speed piles. Remedy Cards are used for undoing the effects of your opponent's nastiness. Go (Green Light) must be the top card on your Battle pile for you to play any mileage, unless you have played the Right of Way card (see below). Stop is played on your opponent's Go card to prevent them from playing mileage until they play a Go card. Speed Limit is played on your opponent's Speed pile. Until they play an End of Limit they can only play 25 or 50 mile cards, presuming their Go card allows them to do even that. End of Limit is played on your Speed pile to nullify a Speed Limit played by your opponent. Out of Gas is played on your opponent's Go card. They must then play a Gasoline card, and then a Go card before they can play any more mileage. Flat Tire is played on your opponent's Go card. They must then play a Spare Tire card, and then a Go card before they can play any more mileage. Accident is played on your opponent's Go card. They must then play a Repairs card, and then a Go card before they can play any more mileage. Safety Cards: Safety cards prevent your opponent from playing the corresponding Hazard cards on you for the rest of the hand. It cancels an attack in progress, and always entitles the player to an extra turn. Right of Way prevents your opponent from playing both Stop and Speed Limit cards on you. It also acts as a permanent Go card for the rest of the hand, so you can play mileage as long as there is not a Hazard card on top of your Battle pile. In this case only, your oppo- nent can play Hazard cards directly on a Remedy card other than a Go card. Extra Tank When played, your opponent cannot play an Out of Gas on your Battle Pile. Puncture Proof When played, your opponent cannot play a Flat Tire on your Battle Pile. Driving Ace When played, your opponent cannot play an Accident on your Battle Pile. Distance Cards: Distance cards are played when you have a Go card on your Battle pile, or a Right of Way in your Safety area and are not stopped by a Hazard Card. They can be played in any combination that totals exactly 700 miles, except that you cannot play more than two 200 mile cards in one hand. A hand ends whenever one player gets exactly 700 miles or the deck runs out. In that case, play continues until neither someone reaches 700, or neither player can use any cards in their hand. If the trip is completed after the deck runs out, this is called Delayed Action. Coup Fourre: This is a French fencing term for a counter-thrust move as part of a parry to an opponent's attack. In current French collo- quial language it means a sneaky, underhanded blow. In Mille Bornes, it is used as follows: If an opponent plays a Hazard card, and you have the corresponding Safety in your hand, you play it immediately, even before you draw. This immediately removes the Hazard card from your Battle pile, and protects you from that card for the rest of the game. This gives you more points (see "Scoring" below). Scoring: Scores are totaled at the end of each hand, whether or not anyone completed the trip. The terms used in the Score window have the following meanings: Milestones Played: Each player scores as many miles as they played before the trip ended. Each Safety: 100 points for each safety in the Safety area. All 4 Safeties: 300 points if all four safeties are played. Each Coup Fourre: 300 points for each Coup Fourre accomplished. The following bonus scores can apply only to the winning player. Trip Completed: 400 points bonus for completing the trip to 700 or 1000. Safe Trip: 300 points bonus for completing the trip without using any 200 mile cards. Delayed Action: 300 points bonus for finishing after the deck was exhausted. Extension: 200 points bonus for completing a 1000 mile trip. Shut-Out: 500 points bonus for completing the trip before your opponent played any mileage cards. Running totals are also kept for the current score for each player for the hand (Hand Total), the game (Overall Total), and number of games won (Games). 4th Berkeley Distribution June 1, 1994 MILLE(6)
All times are GMT -4. The time now is 07:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy