linux - Use Xargs to wait for enter key -


so, have list of files want use generate new set of groups of files. want open these groups (multiple files) @ once. edit them. go terminal, hit enter, , open next group of files.

i've got working, i'm using temporary file so

cat failingall | awk '{print $2}' | xargs -i {} -l 1 sh -c "find {} | grep xml | xargs echo;" | perl -pe "s/^(.*)$/open \1;read;/g" > command.sh ; sh command.sh 

is possible xargs? really, mean without temporary file. tried this

cat failingall | awk '{print $2}' | xargs -i {} -l 1 sh -c "find {} | grep xml | xargs open ; read;" 

but not pause in between groups, opens them @ once (and crashes xml editor.)

try , quit editor when finish editing each group of files?

while ifs= read -r dir;     files=()     while ifs= read -r -d '' xmlfile;         files+=("$xmlfile")     done < <(find "$dir" -name "*.xml" -type f -print0)     open -w "${files[@]}" done < <(awk '{print $2}' failingall) 

assuming don't want have quit editor , assuming can take new set of files via subsequent call open following might work:

while ifs= read -u 3 -r dir;     files=()     while ifs= read -r -d '' xmlfile;         files+=("$xmlfile")     done < <(find "$dir" -name "*.xml" -type f -print0)     open "${files[@]}"     read done 3< <(awk '{print $2}' failingall) 

Comments

Popular posts from this blog

PHP DOM loadHTML() method unusual warning -

python - How to create jsonb index using GIN on SQLAlchemy? -

c# - TransactionScope not rolling back although no complete() is called -