How to apply inverse of head/tail

It seems as if I find myself wanting to extract the inverted selection of head or tail almost as often as I do the normal selection. Ie, I want to filter *out* the first or last n lines of some standard input. Is there a simple way to do this, aside from writing a short script to get the line count, then head/tailing off the complement of what I want? I wish head and tail had the grep equivalent of -v.

From what I understand, the inverse of
head -n 25 file
would be
tail -n +25 file
and the inverse of
tail -n 25 file
would be
head -n -25 file
Is this what you want?

Similar Messages

  • How To apply bold property to the table header

    Hi All,
    Please advice me that how to apply bold property and backgroud color to the table column header.?
    Any help is greatly appreciated.
    Thanks in advance.
    Sathya Rani M

    You can loop through the rows and apply the "fillColor" property for rows. Loop length is the "headerRowCount" of the table.
    In the same loop you could also loop (a loop within a loop) through all cells of a row and set its "texts" obejct, which is an array, to the text style you wish. Or you could apply a paragraph style or a character style, that is pre-defined.
    Uwe

  • How to apply a commandlink to an ADF Header row cell

    I am implementing an ADF read only table. I have one column that I am designating as an add/delete column. In simple terms I would like the cell for this column in the header row to have a command link behind it which pops up an "Add Row" form. For each individual detail row the column will have a command link with the "Delete" function. I am having no problems with the delete.
    My question is, "Does anyone have guidance on how to apply a command link to a header row cell"

    Here is a sample based on your use-case:
    <af:table value="#{bindings.Employees.collectionModel}" var="row" rows="#{bindings.Employees.rangeSize}"
    emptyText="#{bindings.Employees.viewable ? 'No data to display.' : 'Access Denied.'}"
    fetchSize="#{bindings.Employees.rangeSize}" rowBandingInterval="0"
    selectedRowKeys="#{bindings.Employees.collectionModel.selectedRow}"
    selectionListener="#{bindings.Employees.collectionModel.makeCurrent}" rowSelection="single"
    id="t1">
    <af:column sortProperty="#{bindings.Employees.hints.FirstName.name}" sortable="false"
    headerText="#{bindings.Employees.hints.FirstName.label}" id="c1">
    <af:outputText value="#{row.FirstName}" id="ot1"/>
    </af:column>
    <af:column sortProperty="#{bindings.Employees.hints.LastName.name}" sortable="false"
    headerText="#{bindings.Employees.hints.LastName.label}" id="c2">
    <af:outputText value="#{row.LastName}" id="ot2"/>
    </af:column>
    *<af:column id="c3">*
    *<f:facet name="header">*
    *<af:commandLink text="Add" id="cl2"/>*
    *</f:facet>*
    *<af:commandLink text="Delete" id="cl1"/>*
    *</af:column>*
    </af:table>

  • How to apply a Character Style that's already been made in a template document?

    First of all I'd like to thank everyone that helps. I'm a complete beginner at scripting and appreciate all your help.
    I'm basically using GREP expressions to find patterns in a document and apply a Character Style which has already been made. This Character style was not made using script, but just in InDesign when making and setting up the template.
    var myDoc = app.activeDocument;
    //Clear the find/change grep preferences.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    //Set the find options.
    app.findChangeGrepOptions.includeFootnotes = false;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = false;
    app.findChangeGrepOptions.includeMasterPages = false;
    //GREP Expression for finding all HEADERS
    app.findGrepPreferences.findWhat = ".+\n";
    //Applying formatting changes to put into All Caps, Bold and changing the font size to 12 pt.
    app.changeGrepPreferences.capitalization = Capitalization.allCaps;
    app.changeGrepPreferences.fontStyle = "Bold";
    app.changeGrepPreferences.pointSize = "12";
    myDoc.changeGrep();
    //Clear the find/change preferences after the search.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    This is how I currently have it. I will manually define the changes to the text. The problem is, each template uses a different set of fonts and not all of them use Bold e.g. Sabon can use CE Bold.
    I would like to learn how to apply a Character Style and have tried looking around but nothing seems to work.
    Any help would be much appreciated.
    Thanks.

    select the text where u went  and run below  script after change group as per ur template.
    var myDoc = app.activeDocument;
    var mySel = app.selection[0];
    //Clear the find/change grep preferences.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    //Set the find options.
    app.findChangeGrepOptions.includeFootnotes = false;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = false;
    app.findChangeGrepOptions.includeMasterPages = false;
    //GREP Expression for finding all HEADERS
    app.findGrepPreferences.findWhat = "role";
    //Applying formatting changes to put into All Caps, Bold and changing the font size to 12 pt.
    //app.changeGrepPreferences.capitalization = Capitalization.allCaps;
    //~ app.changeGrepPreferences.fontStyle = "Bold";
    //~ app.changeGrepPreferences.pointSize = "12";
    app.changeGrepPreferences.appliedCharacterStyle=myDoc.characterStyleGroups.item("Style Group 1").characterStyleGroups.item("Style Group 2").characterStyles.item("Header")// Header is name of character name
    mySel.changeGrep();
    //Clear the find/change preferences after the search.
    app.findGrepPreferences = NothingEnum.nothing;
    app.changeGrepPreferences = NothingEnum.nothing;
    If it's help then click yes
    Mi_D

  • How to apply Muse (webfont) styles to BC Blogs/Contact Forms?

    Hi all.
    So my site (designed in Muse) is pretty much ready, except for my blog and a couple of forms. I've just gone through making it my partner site, replacing the so-called "bre-built" default site. That process was very, very simple, but BC Support told me it would be much more complicated than it needed to be - it wasn't! I was able to simply publish via Muse to my partner site domain and everything worked fine...
    Anyway... Headers in my site use the "Bebas Neue" webfont selected from within Muse (I assume this is a Typekit font?), at 30pt and a custom colour #B10505. Body text is simply "Trebuchet" (a standard font) in black at 12pt. Now, I'm aware that not everything designed in Muse shows up "as shown" when doing any editing in the back-end of BC. I've just begun following through the tutorial for setting up BC modules on a Muse site and have gotten to the "Inspect Element" stage...
    This is where I've hit a snag. This video: http://www.businesscatalyst.com/bc-blog/adding-business-catalyst-features-to-your-muse-sit es (with the blog part starting near the end of 19 minutes) clearly uses a standard font and not a webfont, so when I'm inspecting with Firebug, what's shown in the video doesn't show up the same in reality for me. This is because a standard font is applied in Muse designed sites where a webfont is in use, and the webfont simply "masks" the standard font (if I'm not mistaken?)...
    I've read this topic: http://forums.adobe.com/message/5480712#5480712 which pretty much asks the same question I'm asking, but this guy clearly has more knowledge (or maybe more common sense) than me, so I'm asking it in a new topic here...
    Can someone please walk me through (step-by-step) how to apply Muse selected webfont CSS styles to the relevant files in BC so that my blog shows up with a consistent look and feel to the rest of my site? I'll literally need every step walking through with minimal jargon if possible - this area of web design is not my forte!
    I suppose I'd also like the same process walking through for contact forms if possible? Alongside the header font, I've got a custom styled, beveled button made on a standard Muse contact form that I'd like replicating on a BC-made form.
    I'm sure once I understand this process, I'll be able to apply this to any BC module; I just need that initial helping hand that neither the BC team or the Muse team seem to want to reference in their tutorial videos!
    Any help would be greatly appreciated! Thanks in advance!

    Hi
    So, are these links in lieu of a full walkthrough, to help me better understand until if/when you get the time to explain?
    The cssbasics.com link isn't working, FYI.
    Looking through the typekit page, it seems fairly straight forward. Is this the same set of fonts Muse uses?
    If so, theoretically do I just need to copy the snippet of code from the typekit site for my desired font (Bebas Neue) and paste it into the modulestylesheet.css file? Where? At the bottom of everything else? Presumably commenting what it is? and define that I want to use that as a header font? Can you walk me through exactly what I need to put for that?
    Then I guess I just need to follow the rest of the video tutorial I linked above?
    Or is there a little more to it than that?
    Would I need to do the same to define trebuchet as the body font, or is there a different block of code I need for that, since that's not a webfont?
    Sorry for being so slow with it!

  • How to do a spinning heads effect with a single footage? (link to a video for clarification)

    hi.
    Could anybody give me a hint how to create this spinning heads effect demonstrated in this video (starting from 0:08):
    https://www.youtube.com/watch?v=05ZvII57p_M
    The biggest mystery for me is how the spinning heads maintain their 3-dimensionality throughout the cycle. I attempted to do something similar with my own head's footage by applying CC Cylinder, but with only this effect the face becomes flat when it turns to 90 degrees. 
    The author of this video claimed in multiple interviews that he uses only After Effects for all of his videos, so i'm pretty sure AE was used in this one too.

    Go buy a lazy suzan bearing at Home Depot, Set a chair on it. Center your head on the turning axis and put a green screen behind you. Shoot your head as you spin around.
    (edit: or sit on a stool with a seat that will spin as Dave suggested)
    Shoot a clean plate (the actor is not in the scene) then have the actor walk in. Roto out the head so the clean plate is in the background. Key out your spinning head green screen footage and put it between the clean plate and the rooted actor.

  • How the Sales OH (Over Head) Calculated

    Dear Experts,
    I have query regarding Sales OH Calculation,
    How the Sales OH (Over Head) will be calculated  and what basis system will take it.
    My requirement is OH reporting in COPA.
    And send me customizing steps for Sales OH Calculation.
    I am awaiting for your kind perusal.
    Thanks,
    KBR

    Hi Kurru Bhaskar,
    If u want to apply OH to material or production that will come from define costing sheet under product costing and assign  to valuation variant OKKN keep ur costing sheet under overhead tab in valuation variant.
    if u want specifically want to apply indirect cost to sales order define sepeate costing sheet and give that costing sheet .
    IMG>Controlling>Product Cost Controlling>Cost Object Controlling>Product Cost by Sales Order>Control of Sales-Order-Related Production/Product Cost by Sales Order>Check Requirements Classes.
    under requiremetn type under costing sheet tab.
    let me know any douts ML Bhaskahr.
    thanks
    kareem

  • Macbook pro system running slow - etrecheck shows issues - any idea how to apply fixes?

    Hi I normally consider myself pretty web savvy but I'm totally lost on what to do here. This computer has been running slow since I got it, but the harddrive went sideways recently. I've never worked with a recovered drive - which I apparently have as my terminal lists my workfolder-2 so....I'm guessing I'm pretty screwed. I learned about etrecheck through the forums here but don't understand how to apply it
    Would anyone help me understand what I need to do?
    Here's my etrecheck:
    Problem description:
    very slow osx system even with only one or two apps open - standard 2013 macbook pro
    EtreCheck version: 2.1.5 (108)
    Report generated January 1, 2015 9:52:46 PM EST
    Click the [Support] links for help with non-Apple products.
    Click the [Details] links for more information about that line.
    Click the [Adware] links for help removing adware.
    Hardware Information: ℹ️
      MacBook Pro (13-inch, Mid 2012) (Verified)
      MacBook Pro - model: MacBookPro9,2
      1 2.5 GHz Intel Core i5 CPU: 2-core
      4 GB RAM
      BANK 0/DIMM0
      2 GB DDR3 1600 MHz ok
      BANK 1/DIMM0
      2 GB DDR3 1600 MHz ok
      Bluetooth: Good - Handoff/Airdrop2 supported
      Wireless:  en1: 802.11 a/b/g/n
    Video Information: ℹ️
      Intel HD Graphics 4000 - VRAM: 512 MB
      Color LCD 1280 x 800
    System Software: ℹ️
      OS X 10.8.5 (12F45) - Uptime: 4 days 8:16:35
    Disk Information: ℹ️
      APPLE HDD HTS545050A7E362 disk0 : (500.11 GB)
      disk0s1 (disk0s1) <not mounted> : 210 MB
      Macintosh HD (disk0s2) / : 499.25 GB (310.25 GB free)
      Recovery HD (disk0s3) <not mounted>  [Recovery]: 650 MB
      HL-DT-ST DVDRW  GS31N disk1 : (369.9 MB)
      disk1s1 (disk1s1) <not mounted> : 54 MB
      disk1s2 (disk1s2) <not mounted> : 26 MB
      disk1s3 (disk1s3) <not mounted> : 34 MB
      disk1s4 (disk1s4) <not mounted> : 33 MB
      disk1s5 (disk1s5) <not mounted> : 65 MB
      disk1s6 (disk1s6) <not mounted> : 29 MB
      disk1s7 (disk1s7) <not mounted> : 26 MB
      disk1s8 (disk1s8) <not mounted> : 20 MB
      disk1s9 (disk1s9) <not mounted> : 36 MB
      disk1s10 (disk1s10) <not mounted> : 12 MB
      disk1s11 (disk1s11) <not mounted> : 35 MB
    USB Information: ℹ️
      Apple Inc. FaceTime HD Camera (Built-in)
      Apple Inc. Apple Internal Keyboard / Trackpad
      Apple Inc. BRCM20702 Hub
      Apple Inc. Bluetooth USB Host Controller
      Apple Computer, Inc. IR Receiver
    Thunderbolt Information: ℹ️
      Apple Inc. thunderbolt_bus
    Configuration files: ℹ️
      /etc/hosts - Count: 2
    Gatekeeper: ℹ️
      Mac App Store and identified developers
    Kernel Extensions: ℹ️
      /Applications/VMware Fusion.app
      [not loaded] com.vmware.kext.vmci (90.4.18) [Support]
      [not loaded] com.vmware.kext.vmioplug.10.1.24 (10.1.24) [Support]
      [not loaded] com.vmware.kext.vmnet (0104.03.86) [Support]
      [not loaded] com.vmware.kext.vmx86 (0104.03.86) [Support]
      [not loaded] com.vmware.kext.vsockets (90.4.23) [Support]
      /System/Library/Extensions
      [loaded] at.obdev.nke.LittleSnitch (4228 - SDK 10.8) [Support]
      [loaded] com.globaldelight.driver.BoomDevice (1.1 - SDK 10.1) [Support]
      [not loaded] com.waltop.iokit.driver.USBAtTablet (1.1.0) [Support]
    Problem System Launch Agents: ℹ️
      [failed] com.apple.accountsd.plist
      [failed] com.apple.CalendarAgent.plist
      [failed] com.apple.coreservices.appleid.authentication.plist
      [failed] com.apple.pbs.plist
      [failed] com.apple.printtool.agent.plist
      [failed] com.apple.tccd.plist
    Problem System Launch Daemons: ℹ️
      [failed] com.apple.wdhelper.plist
    Launch Agents: ℹ️
      [running] at.obdev.LittleSnitchUIAgent.plist [Support]
      [not loaded] com.adobe.AAM.Updater-1.0.plist [Support]
      [loaded] com.google.keystone.agent.plist [Support]
      [running] com.penpad.penpadtablet.plist [Support]
      [loaded] org.chromium.chromoting.plist [Support]
    Launch Daemons: ℹ️
      [running] at.obdev.littlesnitchd.plist [Support]
      [loaded] com.adobe.fpsaud.plist [Support]
      [invalid?] com.adobe.SwitchBoard.plist [Support]
      [loaded] com.github.GitHub.GHInstallCLI.plist [Support]
      [loaded] com.google.keystone.daemon.plist [Support]
      [loaded] com.microsoft.office.licensing.helper.plist [Support]
    User Launch Agents: ℹ️
      [loaded] com.adobe.AAM.Updater-1.0.plist [Support]
      [loaded] com.adobe.ARM.[...].plist [Support]
      [failed] homebrew.mxcl.postgresql.plist [Support]
    User Login Items: ℹ️
      Boom Application (/Applications/Boom.app)
      iTunesHelper Application (/Applications/iTunes.app/Contents/MacOS/iTunesHelper.app)
    Internet Plug-ins: ℹ️
      JavaAppletPlugin: Version: 14.9.0 - SDK 10.7 Check version
      o1dbrowserplugin: Version: 5.38.6.0 - SDK 10.8 [Support]
      AdobeExManDetect: Version: AdobeExManDetect 1.1.0.0 - SDK 10.7 [Support]
      Silverlight: Version: 5.1.20513.0 - SDK 10.6 [Support]
      FlashPlayer-10.6: Version: 15.0.0.246 - SDK 10.6 [Support]
      WidevineMediaOptimizer: Version: 6.0.0.12757 - SDK 10.7 [Support]
      QuickTime Plugin: Version: 7.7.1
      Flash Player: Version: 15.0.0.246 - SDK 10.6 Mismatch! Adobe recommends 16.0.0.235
      googletalkbrowserplugin: Version: 5.38.6.0 - SDK 10.8 [Support]
      AdobePDFViewer: Version: 10.1.1 [Support]
      Autodesk123D32: Version: Autodesk123D32 1.0.6 - SDK 10.7 [Support]
      DirectorShockwave: Version: 12.1.3r153 - SDK 10.6 [Support]
    Safari Extensions: ℹ️
      Searchme [Installed] Adware! [Remove]
    3rd Party Preference Panes: ℹ️
      remoting_host_prefpane  [Support]
      Flash Player  [Support]
    Time Machine: ℹ️
      Time Machine not configured!
    Top Processes by CPU: ℹ️
          3% coreaudiod
          2% Activity Monitor
          1% WindowServer
          1% activitymonitord
          1% Google Chrome
    Top Processes by Memory: ℹ️
      168 MB Google Chrome
      49 MB Google Chrome Helper
      34 MB mds
      30 MB WindowServer
      26 MB Finder
    Virtual Memory Information: ℹ️
      93 MB Free RAM
      1.39 GB Active RAM
      1.35 GB Inactive RAM
      1.45 GB Wired RAM
      48.43 GB Page-ins
      17.53 GB Page-outs

    Searchme [Installed] Adware! [Remove]
    Start by going to Safari/Preferences/Extensions and un-install the above.
    17.53 GB Page-outs
    Adding some RAM would help. Even though you haven't restarted for 4+ days, this is a little high. The 2 places I’ve seen recommended most to buy reliable RAM are below. I have purchased RAM several times from Other World Computing and have always been very satisfied with the product and service. They have on-line instructions on how to replace the RAM. OWC has also tested RAM above what Apple states is the maximum. I now have 6GB installed on a machine supposedly limited to 4 GB.
    Crucial
    Other World Computing
    Activity Monitor – Monitor Performance Problems  
    Performance Guide
    Why is my computer slow
    Why your Mac runs slower than it should
    Slow Mac After Mavericks
    Things you can do to resolve slowdowns  see post by Kappy

  • How to apply an Outlook 2013 Open license to a pre-installed Office Home and Business 2013 installation for Email Auto Archiving functionality

    We're deploying new Dell pc's.
    Unfortunately we have a large existing install base of Office Home and Business in the field due to customers buying Office bundled on Dell machines.  Buying Open License Outlook licenses is more cost effective than upgrading to Office Pro Plus for all
    these users and is our preferred path.  We aren’t sure how to apply these Open License Outlook licenses since the Home and Business installations work off a single license key for all the applications

    Hi,
    Isn't the Office bundled on Dell machines already activated?
    If it's the OEM version that has been installed on the machines and you want to use retail product keys to activate the Office, it's not possible. You will need to uninstall the OEM version and install the retail version.
    You can check the OEM licensing system here:
    http://www.microsoft.com/OEM/en/licensing/productlicensing/Pages/office-2013-licensing-packaging.aspx
    To find more help about OEM depolyment, I should recommend you to get contact with the OEM Reseller Support System
    http://www.microsoft.com/OEM/en/Pages/contactus.aspx
    If I misunderstood anything, please feel free to post back.
    Regards,
    Melon Chen
    TechNet Community Support

  • How to apply album cover picture to all songs on cd not just one at a time?

    i found agreat website with free cd covers for my songs that will show up in the corner of my ipod. but i can figure out how to apply the picture to all the songs in an alubm an dnot just one, i can only drag the picture into the box in itunes one by one.

    I highly recommend Album Cover Finder
    http://www.amphonicdesigns.com/albumcoverfinder/
    It's not free, but it's worth the small investment of 9 bucks.
    I just point it to my iTunes library and it batch uploads the artwork to every file automatically.

  • How to include a license header in fxml file?

    How to include a license header in fxml file?
    I tried xml block comments <!-- mylicense here -->
    but it wasn't accepted by screen builder.
    Also I wondered, even if it had been accepted, would screen builder have saved the header back - or deleted it?

    All XML documents should begin with an XML declaration.
    If you have your fxml file starting with  the following lines :
    <?xml version="1.0" encoding="UTF-8"?>
    <!-- mylicense here -->
    .. it will be loaded in Scene Builder, and saved back as is.

  • How to include WS-Security Header in the WSDL

    hi
    how to include WS-Security Header which have username and password as
    i had seen the below link it deals with just hello world which is not using any Services(DBAdapter) is it possible to use DBAdapter as the steps present in the below link how to include WS-Security Header which have username and password
    http://blogs.oracle.com/reynolds/2005/09/invoking_bpel_from_an_html_for.html

    As Amir suggested, you may provide in the URL but I wouldn't suggest it though. You don't want to hard code the user ID and password within in the WSDL because it is a bad practice especially the user ID and password may be different in different systems and every time you change the password, you have to regenarate your WSDL.
    May be you thought through this but just in case if you didn't
    KK

  • How do i make letter heads on all pages

    How do I make letter heads on all pages in pages?

    In the inspector, click the first icon, "Document.'
    In that window, check 'Headers' and or 'Footers.'
    Clicking in the area near the top (or bottom) will put the cursor in a box where you can create the page headers or footers.
    Headers and Footers can appear:
    On all pages,
    All except the first page, and
    Differently on right and left pages.
    You can insert text boxes into the header and footer fields as well, and arrange fonts and alignments for each text box separately.
    You can past images into the headers and footers. Drag the image into the page. Cut it. Click the header or footer box. Paste it. Resize it.
    Good luck, and have fun!

  • Hi, I am using USB 8476s to communicat​e to a slave unit in LIN network using LabVIEW7.1​. Can anyone tell me how i can send a header file plus 1 byte of data to the slave in a LIN network. or how do i use ldf file. i want to read responses from the slave

    Hi,   I am using USB 8476s to communicate to a slave unit in LIN network. Can anyone tell me how i can send a header frame plus 1 byte of data to the slave in a LIN network. or how do I communictae with slave using LabVIEW7.1.
    I want to read responses from the slave. When i tried with labview exapmle programs or even using MAX also, while doing some switching action in my slave, i am getting response as Device inactive with timestamp but there is no data format. 
    And I have Lin Description File. Can you suggest me how to use ldf file.
    I am at customer place and It would be great help from you if you can suggest me at the earliest. Thank you

    you may use the LDF Starter Kit to use LDF informations in your application
    http://joule.ni.com/nidu/cds/view/p/id/665/lang/en

  • How do I add a header/footer to a document?

    I am using Adobe X Standard, version 10.1.2 and everything I am reading tells me to go to tools>pages>Header & Footer>Add Header & Footer, but once I click on tools to the left, the only options I have are export and create pdf files and send files. There is no tools option in the tool bar on the top. File, edit, view, window & help are my only options. How can I add a header/footer to a document?!

    I think you might be opening your Pdf document in Adobe Reader. If you try open your pdf document in Adobe Standard and check again as far as your option are concerned you should be able to do that.

Maybe you are looking for