Guest User

http://stackoverflow.com/a/25031230/874188

a guest
Sep 5th, 2014
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. babian$ while read -r file fields; do
  2. > printf "%s" "$fields" >"$file"
  3. > done <<HERE
  4. > one_file.txt abc | def
  5. > two_file.txt ghi | jkl
  6. > three_file.txt mno | pqr
  7. > four_WORD.txt xyz | xyz
  8. > HERE
  9. babian$ cat *file.txt
  10. abc | defmno | pqrghi | jklbabian$ for f in *_file.txt; do (cat "${f}") >> full_set.txt; done
  11. babian$ cat full_set.txt
  12. abc | defmno | pqrghi | jklbabian$ sed '' *file.txt
  13. abc | def
  14. mno | pqr
  15. ghi | jklbabian$
Add Comment
Please, Sign In to add comment