(command.CommandList children: [ (command.Simple blame_tok:<set> more_env:[] words:[{<set>} {<-e>}] redirects:[] do_fork:T) (command.ShAssignment left: <Id.Lit_VarLike 'dir='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'dir='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dir='> name:dir) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number 1))} ) ] redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<-z>} {(DQ ($ Id.VSub_DollarName dir))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} { (SQ < 'This script is for destroying old /var/lib/docker directories more safely than' > ) } ] redirects: [] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [ {<echo>} {(SQ <' "rm -rf", which can cause data loss or other serious issues.'>)} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>}] redirects: [] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'usage: '> ($ Id.VSub_Number 0) <' directory'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <' ie: '> ($ Id.VSub_Number 0) <' /var/lib/docker'>)}] redirects: [] do_fork: T ) ] redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] right: <Id.Lit_RBrace '}'> ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [14 27] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} { (DQ (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <id> more_env: [] words: [{<id>} {<-u>}] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) ) } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {<0>} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'error: '> ($ Id.VSub_Number 0) <' must be run as root'>)}] redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [81 101] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {<Id.KW_Bang '!'>} {<-d>} {(DQ ($ Id.VSub_DollarName dir))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'error: '> ($ Id.VSub_DollarName dir) <' is not a directory'>)}] redirects: [(Redir op:<Id.Redir_GreatAnd '>&'> loc:(redir_loc.Fd fd:1) arg:{<2>})] do_fork: T ) (command.ControlFlow keyword:<Id.ControlFlow_Exit exit> arg_word:{<1>}) ] spids: [123 138] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'dir='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'dir='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'dir='> name:dir) op: assign_op.Equal rhs: { (DQ (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <readlink> more_env: [] words: [{<readlink>} {<-f>} {(DQ ($ Id.VSub_DollarName dir))}] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) ) } ) ] redirects: [] ) (command.Simple blame_tok:<echo> more_env:[] words:[{<echo>}] redirects:[] do_fork:T) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(DQ <'Nuking '> ($ Id.VSub_DollarName dir) <' ...'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok: <echo> more_env: [] words: [{<echo>} {(SQ <' (if this is wrong, press Ctrl+C NOW!)'>)}] redirects: [] do_fork: T ) (command.Simple blame_tok:<echo> more_env:[] words:[{<echo>}] redirects:[] do_fork:T) (command.Subshell left: <Id.Op_LParen _> child: (command.CommandList children: [ (command.Sentence child: (command.Simple blame_tok: <set> more_env: [] words: [{<set>} {<-x>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.Simple blame_tok: <sleep> more_env: [] words: [{<sleep>} {<10>}] redirects: [] do_fork: T ) ] ) right: <Id.Right_Subshell _> redirects: [] ) (command.Simple blame_tok:<echo> more_env:[] words:[{<echo>}] redirects:[] do_fork:T) (command.ShFunction name_tok: <dir_in_dir> name: dir_in_dir body: (BraceGroup left: <Id.Lit_LBrace '{'> children: [ (command.ShAssignment left: <Id.Lit_VarLike 'inner='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'inner='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'inner='> name:inner) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number 1))} ) ] redirects: [] ) (command.ShAssignment left: <Id.Lit_VarLike 'outer='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'outer='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'outer='> name:outer) op: assign_op.Equal rhs: {(DQ ($ Id.VSub_Number 2))} ) ] redirects: [] ) (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} { (DQ (BracedVarSub left: <Id.Left_DollarBrace '${'> token: <Id.VSub_Name inner> var_name: inner suffix_op: (suffix_op.Unary op: <Id.VOp1_Pound '#'> arg_word: {($ Id.VSub_DollarName outer)} ) right: <Id.Right_DollarBrace '}'> ) ) } {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ ($ Id.VSub_DollarName inner))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) ] redirects: [] right: <Id.Lit_RBrace '}'> ) ) (command.ForEach keyword: <Id.KW_For for> iter_names: [mount] iterable: (for_iter.Words words: [ { (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Simple blame_tok: <awk> more_env: [] words: [{<awk>} {(SQ <'{ print $5 }'>)} {<'/proc/self/mountinfo'>}] redirects: [] do_fork: T ) right: <Id.Eof_RParen _> ) } ] ) semi_tok: <Id.Op_Semi _> body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.ShAssignment left: <Id.Lit_VarLike 'mount='> pairs: [ (AssignPair left: <Id.Lit_VarLike 'mount='> lhs: (sh_lhs_expr.Name left:<Id.Lit_VarLike 'mount='> name:mount) op: assign_op.Equal rhs: { (DQ (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.AndOr children: [ (command.Simple blame_tok: <readlink> more_env: [] words: [{<readlink>} {<-f>} {(DQ ($ Id.VSub_DollarName mount))}] redirects: [] do_fork: T ) (command.Simple blame_tok: <true> more_env: [] words: [{<true>}] redirects: [] do_fork: T ) ] ops: [<Id.Op_DPipe _>] ) right: <Id.Eof_RParen _> ) ) } ) ] redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.AndOr children: [ (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName dir))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ ($ Id.VSub_DollarName mount))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <dir_in_dir> more_env: [] words: [ {<dir_in_dir>} {(DQ ($ Id.VSub_DollarName mount))} {(DQ ($ Id.VSub_DollarName dir))} ] redirects: [] do_fork: T ) ] ops: [<Id.Op_DAmp _>] ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Subshell left: <Id.Op_LParen _> child: (command.CommandList children: [ (command.Sentence child: (command.Simple blame_tok: <set> more_env: [] words: [{<set>} {<-x>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.Simple blame_tok: <umount> more_env: [] words: [{<umount>} {<-f>} {(DQ ($ Id.VSub_DollarName mount))}] redirects: [] do_fork: T ) ] ) right: <Id.Right_Subshell _> redirects: [] ) ] spids: [294 324] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] right: <Id.KW_Done done> ) redirects: [] ) (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <command> more_env: [] words: [{<command>} {<-v>} {<btrfs>}] redirects: [ (Redir op: <Id.Redir_Great '>'> loc: (redir_loc.Fd fd:1) arg: {<'/dev/null'>} ) (Redir op: <Id.Redir_GreatAnd '2>&'> loc: (redir_loc.Fd fd:2) arg: {<1>} ) ] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.ForEach keyword: <Id.KW_For for> iter_names: [subvol] iterable: (for_iter.Words words: [ { (CommandSub left_token: <Id.Left_DollarParen '$('> child: (command.Pipeline children: [ (command.Simple blame_tok: <find> more_env: [] words: [ {<find>} {(DQ ($ Id.VSub_DollarName dir))} {<-type>} {<d>} {<-inum>} {<256>} ] redirects: [] do_fork: T ) (command.Simple blame_tok: <sort> more_env: [] words: [{<sort>} {<-r>}] redirects: [] do_fork: T ) ] ops: [<Id.Op_Pipe _>] ) right: <Id.Eof_RParen _> ) } ] ) semi_tok: <Id.Op_Semi _> body: (command.DoGroup left: <Id.KW_Do do> children: [ (command.If if_kw: <Id.KW_If if> arms: [ (IfArm keyword: <Id.KW_If if> cond: (condition.Shell commands: [ (command.Sentence child: (command.Simple blame_tok: <Id.Lit_LBracket '['> more_env: [] words: [ {<Id.Lit_LBracket '['>} {(DQ ($ Id.VSub_DollarName dir))} {<Id.KW_Bang '!'> <Id.Lit_Equals '='>} {(DQ ($ Id.VSub_DollarName subvol))} {<Id.Lit_RBracket ']'>} ] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) ] ) then_kw: <Id.KW_Then then> action: [ (command.Subshell left: <Id.Op_LParen _> child: (command.CommandList children: [ (command.Sentence child: (command.Simple blame_tok: <set> more_env: [] words: [{<set>} {<-x>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.Simple blame_tok: <btrfs> more_env: [] words: [ {<btrfs>} {<subvolume>} {<delete>} {(DQ ($ Id.VSub_DollarName subvol))} ] redirects: [] do_fork: T ) ] ) right: <Id.Right_Subshell _> redirects: [] ) ] spids: [412 430] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) ] right: <Id.KW_Done done> ) redirects: [] ) ] spids: [353 369] ) ] else_action: [] fi_kw: <Id.KW_Fi fi> redirects: [] ) (command.Subshell left: <Id.Op_LParen _> child: (command.CommandList children: [ (command.Sentence child: (command.Simple blame_tok: <shopt> more_env: [] words: [{<shopt>} {<-s>} {<dotglob>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.Sentence child: (command.Simple blame_tok: <set> more_env: [] words: [{<set>} {<-x>}] redirects: [] do_fork: T ) terminator: <Id.Op_Semi _> ) (command.Simple blame_tok: <rm> more_env: [] words: [{<rm>} {<-rf>} {(DQ ($ Id.VSub_DollarName dir)) <'/'> <Id.Lit_Star '*'>}] redirects: [] do_fork: T ) ] ) right: <Id.Right_Subshell _> redirects: [] ) ] )