bizdelnick,

My 5 cents:

  1. When piping output of find to xargs, always use -print0 option of find and -0 option of xargs. This allows processing files with any allowed characters in names (spaces, new lines etc.). (However I prefer -exec.)
  2. There’s an i command to insert a line in sed, it is better to use it instead of s/^/…n/. It makes code more readable (if we can talk about readability of sed code, huh).
  3. If you want to split a delimiter separated line and print some field, you need cut. Keep awk for more complicated tasks.
  • All
  • Subscribed
  • Moderated
  • Favorites
  • linux@lemmy.ml
  • localhost
  • All magazines
  • Loading…
    Loading the web debug toolbar…
    Attempt #