Monday, November 30, 2009

Set variable to shell command output

Hi,

I need to set the output from the following command to a variable:
date +%s
It's a string of 10 digits.

I tried
let stamp = execute "!date +\%s"
but apparently "execute" doesn't return anything, besides I can't escape "%" character which is treated as buffer name.

--
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

No comments: