bash - Concatenating files from path names -


i have around 1000 text files, each of them containing list of different paths of texts.for each file, want have 1 text file, texts inside paths concatenated. example file looks this:

path: data/www.saglikekibi.com/can/index.html?p=2637.html.txt name: index.html?p=2637.html.txt path: data/www.bebek.com/blog/yazi/yasasin-anneyim-editorden/5259/saglikli-beslenen-organik-ipek/index.html?blogpageno=1.html.txt name: index.html?blogpageno=1.html.txt path: data/www.bebek.com/blog/yazi/yasasin-anneyim-editorden/5259/saglikli-beslenen-organik-ipek/index.html.txt name: index.html.txt path: data/www.bebek.com/blog/yazi/yasasin-anneyim-editorden/5259/saglikli-beslenen-organik-ipek/index.html?blogpageno=2.html.txt name: index.html?blogpageno=2.html.txt 

how can find , concatenate these 1 file?

you can try :

#!/bin/bash  files=/path/to/* f in $files   cat $f | cut -d' ' -f2 | xargs cat >> all.txt done 

i assumed path 2nd column separed space


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -