Skip to content

Instantly share code, notes, and snippets.

Created February 7, 2014 11:31
Show Gist options
  • Save anonymous/8861108 to your computer and use it in GitHub Desktop.
Save anonymous/8861108 to your computer and use it in GitHub Desktop.
Gist created from Brackets
exec: {
//get IP & Set a local variable
get_ip: {
command: 'ifconfig | grep -m 1 "inet addr:192.168.1" | cut -c21-31',
callback: function (error, stdout, stderr) {
if (error !== null) {
grunt.log.error('exec error: ' + error);
};
globalConfig.myIP = stdout;
console.log('set myIP:', globalConfig.myIP);
},
stdout: false,
stderr: false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment