linux - How to read path from input file -


I XML files.now I have a txt file path for those who want to read the path of the text file and print each XML Number of tabs present in file.how to do this?

Here is what I have done

file with the path txt

  / home / user / Desktop / Software / Firefox / searchplugins / bing. xml /home/user/Desktop/softwares/firefox/searchplugins/eBay.xml /home/user/Desktop/softwares/firefox/searchplugins/answers.xml / home / user / Desktop / software / Firefox / Searchplugins / Wikipediakxml / home / user / Desktop / softwares / firefox / blocklist.xml   

code to count the tab for each file

code :.

What tab = $ (tr -cd '\ t' & lt; $ file | wc -c); "File $ tabs tabs" "gt; & gt; /home/user/Desktop/output.txt in $ file" Echo! "

where /home/user/Desktop/files.txt list of Xml files:

  #! / Bin / bash while IFS = File [-f "$ file"]; then tab = $ (tr-cd '\ t' & lt; "$ file" | wc -c); "$ $ in file $ Tab Tabs "" gt; & Gt; "/ Home / user / desktop / output.txt" fixed & lt; "/home/user/Desktop/files.txt" echo "Done"!    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -