News for hackers. Stuff that matters.
Re:Problem solving with Unix commands by phaemon on Thursday February 14, 2019 @07:27AM (#19161358)
Yup, I'd probably have gone with a `for` loop also. A bit shorter:

  for set in *_data.csv; do
    [[ -f "${set/data/A}" ]] || echo "${set%_data.csv}"
  done
Edit: though I just write it out like this for formatting on HN. In real life, that would just be a one-liner:

for set in *_data.csv; do [[ -f "${set/data/A}" ]] || echo "${set%_data.csv}"; done

Re:Problem solving with Unix commands by hellabites on Thursday February 14, 2019 @06:39PM (#19167150)
Just because I like GNU parallel:

    parallel -kj1 'f="{}"; [[ -f "${f/data/A}" ]] || echo $f' ::: *_data.csv