[solved] grep today, yesterday & the day before

Wah! (= "hi!")
I'm trying to grep the last three days of a list - It's killing me:
| grep -e "\($(($(date +%d)-0))\|$(($(date +%d)-1))\|$(($(date +%d)-2))\) $(date +%b)"
echo grep[stufffromabove]  says:
grep -e \(25\|24\|23\) Aug
... cat list.txt | grepstufffromabove shows no lines at all. Tried several variations of the line, started all over again a few times but I keep messing it up at some times... yes, and I must admit, I've been confusing myself using about 3 different "regex versions" today (uhm... sed, grep, perl, php?), so maybe I keep messing it up this way again....
Could someone tell me what I'm doing wrong?
Last edited by whoops (2009-08-25 19:08:08)

Thanks but...
I just sort of just figured out the obvious and noticed, that I'd even have a big problem if that regex of mine worked.... unluckily, there actually seem to be days with a number smaller than 3, but no negative days in the human calendar... so I'm going to rest first and think it over after that. Most likely I'm going to end up subtracting a day in unix-time and converting back, better ideas are not necessary but welcome .
(edit: oh, and thanks again - that might come handy when I ended up with the same $(\[chaos\]) trying the unix time version later)
Last edited by whoops (2009-08-25 18:29:30)

Similar Messages

  • Can't find my posts of yesterday the day before etc.

    I'm so sorry. Everytime I think to get some little progress in handling adobe apps and some of the many administrative tasks I am thrown back ..
    Today my problem is I can't find anymore  the questions /discussions I posted yesterday and days before to get assistance in installing / updating the creative cloud on my notebook.Even searching for the tags I thought to have given to the posts (CC, error 50, update) bring no result. So my simple sos call means How can I follow my posts, what do I have to do to get answers? How to prevent being lost in the endless space of CC and its forums?

    Viewing Past Messages
    Click your Avatar picture to the left of your message
    Click the Activity option

  • Date format in mail - "yesterday, the day before,..."

    Hello.
    When using mail in the new version, the left gutter gathering all the inboxes, each message summary displays the essentials infos.
    In many cases the date display is set to show the reception hour on the same day (fine), the previous day is shown as "yesterday" and the day before yesterday as "the day-before-yesterday", and finally "two days ago".
    My system is in french thus it's not written" two days ago" but (I translate) "before-before-yesterday".... This doesn't help me anymore.
    Here is my question: is there a way to set the date format in the message short in order to have the full numerical date as soon as "yesterday", actually to always have a numerical date display ... no more "avant-avant-hier".
    Thanks

    Thanks but...
    I just sort of just figured out the obvious and noticed, that I'd even have a big problem if that regex of mine worked.... unluckily, there actually seem to be days with a number smaller than 3, but no negative days in the human calendar... so I'm going to rest first and think it over after that. Most likely I'm going to end up subtracting a day in unix-time and converting back, better ideas are not necessary but welcome .
    (edit: oh, and thanks again - that might come handy when I ended up with the same $(\[chaos\]) trying the unix time version later)
    Last edited by whoops (2009-08-25 18:29:30)

  • I bought a EarPods October last year in USA, the day before yesterday the remoter can not work any more, it means by the EarPod still can lisence music but can not adjust the volume and answer the phone, can I get a new one or what can I get?

    I bought a EarPods October last year in the USA, the day before yesterday the remoter can not work any more, it means by the EarPod still can listen music but can not adjust the volume and answer the phone, can I get a new one or what can I get based on the one year product warrant?

    Now I am live in Baoding city, China, what I can do, it seems there is no apple store in my city??

  • I have lost my iphone 5 the day before yesterday,and have tried many ways to find it, but in vain. i wandered if there are some useful solutions to such kinds of issues, because lots of people have similar terrible experiences. many people lost their app.

    i have lost my iphone 5 the day before yesterday,and have tried many ways to find it, but in vain. i wandered if there are some useful solutions to such kinds of issues, because lots of people have similar terrible experiences. in china many people have lost ihones, which means you also expose all of your information you have saved in iphones. this is dangerous,because criminals can take advantage of those information. i think apple should talke more measures to stop the thieves from using apples so easily.

    cuz me too same case I have also I lost all my photos 800pics

  • I got charged for coins I didn't get in mystery castle $9.99  then bought another game they took out of my iTunes card and also charged it to my credit card that I deleted off my account the day before. Very upset

    I got charged for coins I didn't get in mystery castle for $9.99 then bought a game for $6.99 and they charged my iTunes card and my credit card that I had deleted from my account the day before!   Ticked off

    Contact iTunes support to solve your problem
    expresslane.apple.com

  • My issue is not a particular add-on, but not been able to find out which one has the royan hourse in it, every morning it scans throuth all the site visited the day before and send the information somewhere!

    I first started thinking my all Forum passwords was stolen because all the link as mark as read, so I change my passwords but the problem persisted, so I installed a packet sniffer to see is was a problem of my password been taken as I changed them.. but I could not see that.... BUT as I watch the packets I notice al the domain links of the sites I visited the day before (100's) passing through.., I try testing again but only appends one a day (the first time, maybe twice a day) I open Firefox (3.6 - 3.6.13), how can I pin point the bad add-on? I remove the one I thought were the bad ones (a have 40 or so installed) with no luck, I ran Firefox in save mode and the problem went away!!.. Please help.. One of the add-on from the Firefox Add-on site is snooping on you users..

    Two thoughts:
    (1)     It is possible that your Adobe software was the result of belonging to a now-discontinued Adobe Print Service Provider program where for a certain annual membership fee, print service providers were provided with (a) both a Windows and Macintosh license to the Adobe print-oriented software products (such as InDesign, Illustrator, Photoshop, and Acrobat) and (b) special direct product support as well as the ability to put your name on Adobe's website as a member of this program. The program ended over a year ago if I remember correctly.
    (2)     You may wish to contact Adobe Customer Support (not Technical Support) and see if they can track down any and all licenses associated with your company. If you have the names of the former employees who worked with this software, it would be helpful. Likewise, if you were a member of the discontinued Adobe Print Service Provider program, you may have some options for upgrading/updating the software you have.
    Unfortunately, you cannot get any more definitive information about your situation on these forums.
    Good luck.
              - Dov

  • Why does iCal automatically change the date of the entry i am making to the day before??

    why does iCal automatically change the date of the entry i am making to the day before??
    for example, when i am attempting to make a 'all-day' appointment on october 2nd 2011, it automatically shifts it to october 1st.
    but if i am doing a timed appointment for only a few hours, it will allow me to put it on that day.
    i am trying to put in travel dates so any help on how to fix this, would be greatly appreciated.

    alsdman,
    Quit iCal, and try removing the com.apple.iCal.plist file from your Macintosh HD/Users/yourusername/Library/Preferences Folder. Since that Library is now hidden, you have to use the Finder>Go Menu>Depress the "Option" key>Library. Drag the .plist file to your desktop, and log out/in or restart and check iCal for functionality.
    Also go to System Preferences...>Language & Text>Formats>Region: and set/re-set the appropriate "Region."

  • When I add a new contact number to my iphone 5c  and I try to select the iphone choice is not showing up; and it was working fine the day before. ?

    when I add a new contact number to my iphone 5c  and I try to select the iphone choice is not showing up; and it was working fine the day before. ?Also when I try to send an imessage is not going trough as an imessage, it makes me send it as a message.

    You're using Exchange Active Sync to synchronize contacts and calendars with your company Exchange Server. If the default calendar/address books are set to the Exchange account, it will sync automatically. This is normal.
    Go to Settings>Mail, Contacts, Calendars to change the default address book and calendars to a something else, iCloud or something synced from your home computer instead.

  • Ipad won't turn on, worked fine the day before

    I just set it aside for the night and it worked perfectly fine the day before, but then the next day it won't turn on anymore.

    Have you tried resetting your iPad?
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10-15 seconds).
    No data will be lost.

  • How can i say yes to automatic updates when they stop my wireless dlink to Virgin home broadband from getting on the internet and then i have to do a system restore to the day before the update to get it back to normal?!? Frustrated

    how can i say yes to automatic updates when they stop my wireless dlink to Virgin home broadband from getting on the internet and then i have to do a system restore to the day before the update to get it back to normal?!? Frustrated
    == This happened ==
    Not sure how often
    == automatic updates go on my computer, say if i click yes to update when shutting down

    You have 10.6 on that machine, I suggest you stick with it for performance, third party hardware and software reasons as long as possible.
    Consider 10.8 (not 10.7) when it's released, because 10.7 and 10.8 will require a new investment in software and newer third party hardware as it requires newer drivers the old machines won't have. (forced upgrade because of software, really nice of them)
    http://roaringapps.com/apps:table
    Far as your Safari problem do these things until it's resolved:
    1: Software Update fully under the Apple menu.
    2: Check the status of your plug-ins and update (works for all browsers) also install Firefox and see if your problems continue. You should always have at least two browsers on the machine just in case one fails.
    https://www.mozilla.org/en-US/plugincheck/
    Flash install instructions/problem resolution here if you need it.
    How to install Flash, fix problems
    3: Install Safari again from Apple's web site
    https://www.apple.com/safari/
    4: Run through this list of fixes, stopping with #16 and report back before doing #17
    Step by Step to fix your Mac

  • Why can't I play a certain song on my iPad Mini when it was working the day before, but after syncing it to my iMac, it won't work on both my iPad and my iMac. Plz help

    Why can't I play a certain song on my iPad Mini when it was working the day before, but after syncing it to my iMac, it won't work on both my iPad and my iMac. Plz help

    Accidents happen, and apple can certainly assist you with replacement of said device.  Most manufacters would tell you to buy a brand new retail unit, apple will charge you about half price for a replacement unit.  I agree its unfortunate that it happend, but expecting a free replacement is just going to lead to disappointment

  • TS1631 When I ring someone from my iPhone 4 they can't hear me sometimes and other times they can hear me fine. This has only started happening since I updated to iOS 6 it was perfect the day before.

    When I ring someone from my iPhone 4 they can't hear me sometimes and other times they can hear me fine. This has only started happening since I updated to iOS 6 it was perfect the day before.

    Good news! I believe I have fixed my phone!!
    A friend of mine was having the same problem that I was having where you could hear other people but they couldn't hear you.
    We fixed the problem by redownloading the 4.2.1 update. 4th post down on this page: http://forums.macrumors.com/showthread.php?t=1052794&page=5 is a list of links to the update files. I downloaded the one for my phone and did a restore (from a backup) after downloading the file and double clicking it so iTunes opens. Since I've done this my phone has been working perfectly again!
    It might take you a few tries, it took my friend 3 tries until his worked right and it worked for me on the first try. I'm guessing something was screwing up during the download.

  • ICal entries jump to the day before or after

    iCal entries jump to the day before or after the date I entered them on.  It might have to do with me changing time zones. How do I lock the entries to the date I entered them on?

    Hi sahrack,
    Welcome to the Apple Support Communities!
    It does sound like the time zone may be affecting these events. With time zone support you can set a different time zone for any iCal event. If you would like to keep all events within your current time zone moving forward, you may want to disable the time zone support. 
    iCal 5.x: Change the time zone for an event
    Cheers,
    Joe

  • What is the difference between the new 13" MacBook Pros and the previous version of the 13" MacBook Pro?  I purchased an "old" one from Best Buy the day before the announcement of the new models.

    What is the difference between the new 13" MacBook Pros and the previous version of the 13" MacBook Pro?  I purchased an "old" one from Best Buy the day before the announcement of the new models.

    See the specs:
    Compare Notebooks - Apple Store (U.S.)
    Compare with your model. If you are within 14 days of purchase you can exchange for the new model for the difference in price, if any. Be sure to have all the original packaging and your receipt.

Maybe you are looking for

  • How can I display records quickly in order, using set_block_property

    Hi all, I want to display records in order when I click on button corresponding to that filed.I'm getting result by using set_block_property..but it is displaying records slowly,if number of records are more then it's taking more time to sort the rec

  • How can my Geek Squad protection plan be cancelled without even notifying me!?

    I bought my Iphone 5 back in September 2012 and had to get it replaced in June 2013 because it kept crashing. When I got it replaced I had to cancel my Geek Squad protection plan from my old phone and purchase a new one to cover me till June 2015, wh

  • The symbol "/" in properties file is platform independent ?

    Hi! In my properties file I set many patha to my any resources(path to my icons, path to my user XML file and so on): # content of my properties file userSettingsPath=config/usersettings.xml baseNameImages=/resources/images/ # end As you see in path

  • A page ie6 looks different than in other browsers

    The site is www.GigHarborWashington.com When viewed in most browsers it renders correctly.  When viewed in ie6 a white border on the right is added with approx 180 pixels.  Additionally, a portion of the image behind the nav bar is repeated and the t

  • Error managment in jsps

    hi, in my jsp i have some code like this.. <%@page --------------------------%> <html> file://header part of page using html goes here -------------so on <% try{ file://som functionalites }catch(SQLException e) %> </html> here if any error occures in