Sponsored Content
Full Discussion: Cherry picking with sed?
Top Forums UNIX for Beginners Questions & Answers Cherry picking with sed? Post 302991501 by Don Cragun on Saturday 11th of February 2017 10:07:13 PM
Old 02-11-2017
How did you get to a point where you have dealt at least six cards from a deck, but don't know what cards remain in that deck? One might guess that in most card games you would have known hands for various players, a know set of cards in a discard pile, and a known set of cards remaining in the deck. In a state like this, it would seem to be fairly easy to "shuffle" the discard pile and the current contents of the deck to produce an updated deck rather than create a new deck of 52 cards (some of which duplicate other cards in play).

But, having said that, how do you plan to remove a card from the "deck" when a card is drawn from the deck? Is there any reason why removing the top card from the "deck" should be much different from removing any other card from the "deck"?
 

8 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Using awk : picking specified columns

Hi, I would like to get some specific fields from one long line. My line looks like CcnCDRFile0-8535123473201007170536_2010-07-20_17:06:02:,,9963387265,,,,,00720141432,,+0.310,+79.255,+78.945,,,,1492,,,,0,... (1 Reply)
Discussion started by: kkarthik_kaja
1 Replies

2. UNIX for Dummies Questions & Answers

Picking problem with printers

Hello to everybody i have problem the picking process falls and falls. I dont now what the picking process do i believe that is a print server on a data base i dont know where to look. Is a solaris 10 with korn sheell the process show this ps -ef | grep picking batch 18466 1 0... (5 Replies)
Discussion started by: enkei17
5 Replies

3. Shell Programming and Scripting

need help on picking a right book

hi, I'm searching for a perfect book to learn awk programming, i started with sed&awk book, but i think this book might be outdated as it is written way back in 97 and also it doesn't have many examples. So, I thought of getting some advice from the experts here. Pls suggest me some books. ... (1 Reply)
Discussion started by: dvah
1 Replies

4. Shell Programming and Scripting

Picking matching strings

I have a list of file names. However in some instances I might have a "-" at the beginning of the filename or an "=". For example I might have something like this set Lst = "file1 file2 file3 -file4 file5=" I want to pick up the ones having "-" at the beginning or "=" and store them in... (22 Replies)
Discussion started by: kristinu
22 Replies

5. Shell Programming and Scripting

sed command for picking a part of line

Hello Friends I want to use sed command to pick a part of line. FOr example I only need the /home_put1/bidds/myfo part of following line fish://ulavet@rits1.ula.com.tr/home_put1/bidds/myfo How can I do this bu using sed command ? (2 Replies)
Discussion started by: rpf
2 Replies

6. Shell Programming and Scripting

awk not picking up /PP SIZE/

for vgls in `lsvg` do lsvg $vgls | awk '/^VOLUME GROUP/ { printf "%s ", $3 } /PP SIZE/ { S=$6 } /TOTAL PPs/ { printf "%d ", $6*S/1024 } /FREE PPs/ { print $6*S/1024 } ' done This returns /TOTAL PPs/ and /FREE PPs/ fine, but not /PP SIZE/. Please advise. (11 Replies)
Discussion started by: Daniel Gate
11 Replies

7. Shell Programming and Scripting

Picking values from a file.

Hi, I have a file which contains values in this format. abc cde fgh ijk lmn opq rst uvw The user will pass the required parameter from the command line. My requirement is that script should pick the values passed by the user and the next value in the next line. Like if the user... (10 Replies)
Discussion started by: arijitsaha
10 Replies

8. Shell Programming and Scripting

Picking up files conditionally

Hi I have a scenario: I have a directory say DIR1 (no sub directories) and have few files in that directory as given below: app-cnd-imp-20150820.txt app-cxyzm-imp-20150820.txt app-petco-imp-20150820.txt app-mobility-imp-20150820.txt app-mobility-imp-20150821.txt... (7 Replies)
Discussion started by: Saanvi1
7 Replies
Deck(3I)						    InterViews Reference Manual 						  Deck(3I)

NAME
Deck - a stack of interactors on top of each other SYNOPSIS
#include <InterViews/deck.h> DESCRIPTION
A deck is a scene containing interactors that are conceptually stacked on top of each other. Only one interactor is visible at a time. A deck is useful to implement ``paging'' through a document, or where only one of several similar components should be visible at a time, as in applications using alternate tool pallets or menus with alternate entries. A deck will try to stretch or shrink the visible interactor to fill the total space. The natural size of a deck is the maximum of its com- ponents. A deck uses its perspective to specify which component is visible. The components are numbered in the order in which they are inserted into the deck, starting with one. A scroller or other interactor which operates on the perspective can be used to allow a user to specify the component to view. Either horizontal or vertical scrolling can be used. PUBLIC OPERATIONS
Deck() Construct a new deck. void Insert(Interactor*) Add an interactor to the deck. void Change(Interactor*) Notify the deck that an interactor's shape has changed. If propagation is on, the deck recomputes its own shape and notifies its parent. void Remove(Interactor*) Take an interactor out of a deck. void Flip(int count = 1) void FlipTo(int position) void Top() void Bottom() Perform operations on the perspective to specify the component to view. Flip specifies the component relative to the current compo- nent. A positive value of count specifies a component nearer to the ``bottom'' of the deck (the components inserted last), and a negative value specifies a component nearer to the ``top''. FlipTo specifies a component by its absolute position in the deck. A positive value of position specifies a position from the top, starting at 1. A negative value specifies a position from the bottom, starting at -1. Top and Bottom are equivalent to FlipTo(1) and FlipTo(-1) respectively. SEE ALSO
Interactor(3I), Scene(3I), Shape(3I) InterViews 13 December 1987 Deck(3I)
All times are GMT -4. The time now is 04:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy