Thursday 16 May 2013

Double looping with bash

Neat:
  1. for ITEM in $(find /cassandra/data -type d -name snapshots)
    1. do for DIR in $(find ${ITEM} -maxdepth 1 -mindepth 1 -type d -mtime -1)
      1. do echo $ITEM $DIR
    2. done
  2. done

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Interview questions: 2020-12

Terraform provider vs provisioner Load balancing Network Load Balancer vs Application Load Balancer  Networking Layer 1 vs Layer 4 haproxy u...