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 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 / 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
/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
Post a Comment