techieNetizen's Web Log

Friday, November 12, 2010

BASH script for reading input line by line from a list file and do a loop command


#! /bin/bash
cat file.lst |while read line; do scp "${line}" host:/directory_location; done
Posted by TechNetizen at 11:57 AM No comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: bash commands, bash script, linux
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Search This Blog

About this Blog

My photo
TechNetizen
Hello world, this blog is about my experience on the technology and internet exploration. I document the useful stuffs here for myself and also for sharing them with the WWW if someone is searching for similar information.
View my complete profile

Popular Posts

  • Dell Streak 5: How to Install Official Gingerbread ROM (Android 2.3.3)
  • Dell Streak 5: Root Gingerbread Android 2.3.3 ROM
  • Kindle Fire: WiFi File transfer with Windows PC desktop or laptop
  • XPS 15z: Factory reset, recovery and partitions

Blog Archive

  • ►  2014 (2)
    • ►  July (1)
    • ►  March (1)
  • ►  2013 (3)
    • ►  August (2)
    • ►  July (1)
  • ►  2012 (7)
    • ►  October (1)
    • ►  August (1)
    • ►  May (1)
    • ►  February (2)
    • ►  January (2)
  • ►  2011 (45)
    • ►  December (4)
    • ►  November (7)
    • ►  October (2)
    • ►  July (7)
    • ►  June (11)
    • ►  May (4)
    • ►  April (3)
    • ►  March (1)
    • ►  February (4)
    • ►  January (2)
  • ▼  2010 (12)
    • ►  December (2)
    • ▼  November (1)
      • BASH script for reading input line by line from a ...
    • ►  October (7)
    • ►  September (1)
    • ►  April (1)

Visitor Map


Large Visitor Map

Recent Guests

Free counters!

About the content of the blog and copyright

FAIR USE NOTICE:
http://www.copyright.gov/title17/92chap1.html#107

This blog site does not have any commercial interest. The author does not endorse any of the commercial products mentioned on this blog. Most of the content are for sharing/documenting purpose; especially for education and learning. You may use the content from this blog in unaltered form. But please give a proper credit to the author by referring a URL link to this blog.

DISCLAIMER: 1) The blog posts are my personal experience and opinions. I post it only when I find it successful and useful (unless otherwise stated). If you want to try any of them, use at your own risk and responsibility. 2) This blog site record visitor statistics. That means, the site will collect anonymous, non-personal data like your location, from where you came (google/yahoo), your browser etc. One use of this is to optimize the blog design, post content etc. And the other part is for fun; say, for boosting my ego :)

Thanks for your visit and happy surfing.
Awesome Inc. theme. Powered by Blogger.