An occasional opportunity to officially start using ubuntu at work, although I have used ubuntu occasionally before, I have never officially used it. Next, the file comes. install various software and many familiar Ides won't work.
Svn status | grep "? "| Awk '{print $2}' | while read line; do svn add $ {line}; done;
The principle is relatively simple. it mainly uses redirection and combines some basic commands.
Svn status-- This command is used to view the file information. M indicates modification ,? Unknown (that is, the file to be added)
Grep "? "-- Search for include? Information
Redirects the svn status result to grep "? "The result is to add a file.
Next we use awk to process the string. awk '{print $2}' indicates printing the second data, where $0 indicates the whole row of data.
Svn status | grep "? "| Awk '{print $2}'The result is the file name, and then it is processed cyclically using shell.
While read line; do svn add $ {line}; done;-- Read each row of data and execute svn add
An occasional opportunity to officially start using ubuntu at work, although I have used ubuntu occasionally before, I have never officially used it. Next, the file comes, installing various software, and many familiar Ides won't work. The most miserable thing is to submit code, especially to add a file. it is too troublesome to add only one file at the beginning. The most coder, this kind of thing is absolutely intolerable, so ....