Bash alias help

A 5 star hangout for overworked and underpaid system admins.
Post Reply
mntbighker
Posts: 38
Joined: 2014/11/05 02:00:11

Bash alias help

Post by mntbighker » 2015/08/14 03:53:02

How about a little help with escaping this command in a bash alias file? :?:

#> watch "lsof -n | grep rsync | egrep ' (REG|DIR) ' | egrep -v '( (mem|txt|cwd|rtd) |/LOG)' | awk '{print $9}'"

mntbighker
Posts: 38
Joined: 2014/11/05 02:00:11

Re: Bash alias help

Post by mntbighker » 2015/08/14 18:48:35

Someone on the backuppc list reminded me that a function solves this (duh :roll: ):

Code: Select all

function watchbupc()
{
watch -n 10 "lsof -n | grep rsync | egrep ' (REG|DIR) ' | egrep -v '( (mem|txt|cwd|rtd) |/LOG)' | aw
k '{print $9}'";
}

Post Reply