diff --git a/labs/xv6.html b/labs/xv6.html index fcbb234..2f6a4ae 100644 --- a/labs/xv6.html +++ b/labs/xv6.html @@ -178,6 +178,44 @@ initial file system. You just ran one of them: ls.
Optional: support regular expressions in name matching. Grep has some + primitive support for regular expressions. + +
Write a simple version of the UNIX xargs program: read lines from + standard in and run a command for each line, supplying the line as + arguments to the command. The following example illustrates xarg's + behavior: +
+ $ xargs echo bye + hello too + bye hello too ++ Note that the command here is "echo bye" and the additional + arguments are "hello too", making the command "echo bye hello too", + which outputs "bye hello too". + ++ $ +
xargs and find combine well: +
+ find . b | xargs grep hello ++ will run "grep hello" on each file named b in the directories below ".". + +
Some hints: +
Modify the shell to support wait.