|
FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
Executing Builtin with xargs issue
System: Mac OS X 10.6.4
Problem - returning history id through History command and passing to xargs results in failure. My complete line is: history | grep -m 1 -v -e"history" | awk '/open.*25-2010/ {print $1}' | xargs ! Which basically prints out the identifier (12) for the full line of 12 open ~/Documents/log/08-25-2010.rtf With 12 being passed to xargs "!12" i get the error: xargs: !: No such file or directory I've confirmed by leaving xargs blank that it does receive 12, because that's all it prints out. From my reading it seems like the problem could be executing a shell script (per man history) within a execution utility. I'd appreciate if anyone can confim my theory, if they can provide more useful things to read on the man pages, or contribute more things to test out. The reason I'm using this complicated line instead of ctrl+r is that it seems ctrl doesn't allow me to use the same patterns as I want to in awk or grep. |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Executing web scripts : can't! | erehwon | OpenBSD General | 3 | 3rd November 2009 10:02 PM |
Possible SMP Issue? | MetalHead | OpenBSD General | 1 | 25th November 2008 03:52 AM |
executing commands for all users when X starts with KDM | caesius | FreeBSD General | 2 | 20th October 2008 09:03 AM |
Executing a c program | Libran | Programming | 13 | 12th August 2008 11:42 PM |
RAM issue | nikkon | FreeBSD General | 5 | 7th May 2008 04:26 AM |