Category: UNIX

  • UNIX tip of the day: readlink

    UNIX tip of the day: readlink

    Today I found myself using the readlink command, and it occurred to me that many people might not be aware of it. Here is what the man page says it does readlink – print resolved symbolic links or canonical file names If you work on shared filesystems with other people, such as on a large…


  • UNIX tip of the day: pushd

    UNIX tip of the day: pushd

    I am frequently surprised by the number of colleagues I have who do not know about the BASH builtins pushd and popd. I myself remember seeing them for the first time in a script about 10 years ago, and had to look up the commands. At first I didn’t quite understand the point, but now…


  • UNIX Tip of the day: Strange behavior editing PHP files with vim

    I have been struggling with this weird behavior in vim for the last month or so. I just re-joined Automattic in September. I have been using vim on many different computers and environments (linux, max, cygwin) for over 15 years, and I have never experienced this before. I only seem to have this issue when…


  • UNIX tip of the day —
    duplicate and replace lines with awk

    Today I got some data I wanted to add to my machine learning training datasets for named entity recognition. My system is designed to be used with output from automatic speech recognition (ASR). It is frequently difficult to be certain whether ASR output will contain hyphens or not, e.g. (email, vs e-mail) so frequently I…


  • UNIX tip of the day – grep -P is slow

    Unless you really need some advanced regular expressions only supported by PCRE, using POSIX regular expressions with grep is usually an order of magnitude faster – that’s because the default engine with grep uses finite automata, as opposed to a backtracking algorithm which PCRE uses ( the main featuress you gain from the backtracking algorithm…


Join 165 other subscribers

archives

  • 2024 (10)
  • 2023 (8)
  • 2022 (15)
  • 2021 (19)
  • 2020 (1)
  • 2019 (1)
  • 2018 (2)
  • 2017 (1)
  • 2016 (2)
  • 2015 (5)
  • 2014 (5)
  • 2013 (2)
  • 2011 (7)
  • 2010 (10)
  • 2009 (50)
  • 2008 (28)
  • 2007 (31)
  • 2006 (8)

Category