Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- casso@casso-ThinkPad-T61p:~/tmp$ cat test.sh
- #!/bin/bash
- while read line; do
- echo "$line;$2;$3" >> out.txt
- done < $1
- casso@casso-ThinkPad-T61p:~/tmp$ cat in.txt
- a.b.c.d
- w.e.r.tcasso@casso-ThinkPad-T61p:~/tmp$ ./test.sh in.txt 10.0.0.1 255.255.255.0
- casso@casso-ThinkPad-T61p:~/tmp$ cat out.txt
- a.b.c.d;10.0.0.1;255.255.255.0
- a.b.c.d;10.0.0.1;255.255.255.0
- a.b.c.d;10.0.0.1;255.255.255.0
- casso@casso-ThinkPad-T61p:~/tmp$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement