- 论坛徽章:
- 5
|
如题:
我有写了一个shell脚本:
#!/bin/bash
update database set next_start_time = '2016-03-01 11:00:56', where id = '12345'
update database set next_start_time = '2016-03-01 11:00:56', where id = '23456'
update database set next_start_time = '2016-03-01 11:00:56',where id = '34567'
update database set next_start_time = '2016-03-01 11:00:56', where id = '45678'
我现在想用sed命令达到两种效果,第一个是把 next_start_time = '2016-03-01 11:00:56' 全部替换成 task_priority = 'urgent' ,使用sed命令应该如何来写?
第二个是把 每一行的next_start_time = '2016-03-01 11:00:56'后面都加上 task_priority = 'urgent' ,使用sed命令应该如何来写?
|
|