ls -rt1 | tail -1
Wednesday, July 15, 2009
Thursday, July 9, 2009
escape potential spaces and parentheses in output
ls -rt1 /Users/user/Documents/*.doc | tail -1 | sed 's/ /\\ /g' | sed 's/(/\\(/g' | sed 's/)/\\)/g'
Subscribe to:
Posts (Atom)
ls -rt1 /Users/user/Documents/*.doc | tail -1 | sed 's/ /\\ /g' | sed 's/(/\\(/g' | sed 's/)/\\)/g'