Files with names like "my list.txt" end up being split into "my" and "list.txt", neither of which exists (one would hope).
I imagine there are workarounds less kludgy than what I end up doing; but really it seems like you shouldn't have to worry about it at all - the spaces should be handled appropriately and automatically.
Well, a few suggestions:
Don't use backticks if you can at all help it. Especially don't use `ls`. Instead, use simple globs (i.e., * or blah*.txt or whathaveyou). If you need the flexibility offered by find or the output of ls with a complex set of options, by all means use either the $() or `` syntax. It works for that purpose.
Quote carefully. $FILE is simply expanded into the literal string it contains before the whole line is executed. For example, "mv $FILE place/$FILE" becomes "mv a file name place/a file name". Instead, quote it properly: mv "$FILE" "./archive/$FILE"
Most importantly:
man bash
Your example fixed:
for f in *; do mv "$f" "./archive/$f" done
There are a lot of other fancy things to learn, but at least you can get the simple stuff right now.
I mean, I don't understand all this necessity of creating an "open document" standard. Especially when it comes down to politicians deciding which should be a ubiquitous document format.
To my knowledge, its never been a problem for a software company A to read and support documents from software company B, and vice versa. In fact, when it comes to word processing documents, which are largely text based (in a binary format), the problem is moot. Sure, you may not get some advanced formatting features specific to an individual package, but at least you can get the meat and potatoes of the document.
Unless you go to extraordinary lengths to encrypt a document so that only your application and read and write to it, I don't understand what all the hubbub is about.
You've hit on exactly the problems that ofice suites like OpenOffice.org and KOffice, etc. run into when trying to import or export Word files. You're right that there's nothing stopping anyone from supporting one format or another... However, as an example, Microsoft changes the format of Word files with every version of Office, adding and removing features and changing the binary signature of the file. This requires more effort spent at every new release, reverse-engineering the file format and hopefully finding that one critical detail that defines this text is bold.
Lets put it this way. If Microsoft comes out with an "open standard" and the OSS community comes out with an "open standard", whats the big deal? This means that Microsoft products will be able to natively support OSS document standards, and the OSS community will support Microsoft standards. Its not like either community needs to reverse-engineer the document format, both communities are making their standards open and thus, easily supported by 3rd parties.
Microsoft has come out with an "open standard". OpenXML. They're pushing it through ECMA with the hope that it will become an ISO standard. They were a bit slow in the motions, as OpenDocument has already become an ISO standard: ISO/IED 26300.
The problem is that Microsoft's definition for their XML document standard is so complex and over-engineered, and its licensing so damn confusing, that it's impossible to know whether your implementation of an OpenXML reader or writer is actually legal. The license requires that the implementation be complete, and the definition for that term is so vague as to make it unclear if a conforming implementation will even work along side Microsoft's Word.
On the other hand, OpenDocument is clear enough that it's easy to see whether a conforming implementation is complete, as it's guaranteed to be compatible with any other implementation.
And Microsoft has stated that they will not implement or distribute an ODF plugin for Word. Ever.
What I find laughable is the idea that a government has to support ONE standard. I mean, does it really make a hill of beans difference for politicians? Whether your a politician that support the OSS community, or swears by retail software companies (depends where most of your campaign monies came from or didn't come from), the applications your going to use will be able to support either or standards.
Wrong. Settling on one standard ensures total compatiblility across all platforms and in all circumstances. This means that one computer in a Mac OS X office will be able to exchange documents seamlessly with a Linux computer in another office and those two legacy Windows boxes in another. Seamlessly being the key word.
Because Microsoft has comitted to not supporting ODF, this creates a bit of friction in that suddenly there is guaranteed incompatibility between Microsoft's Word and any other office suite that supp
Have you seen the number of packages you need to add to packages.keywords to switch to X.Org 7.0 in Gentoo? There's no way any sane person will do that until they move it all to the stable branch. echo "=x11-base/xorg-x11-6.9.0-r1" >>/etc/portage/package.unmask is the way to go.
# wc -l/etc/portage/package.keywords/etc/portage/package.unmask 717/etc/portage/package.keywords 161/etc/portage/package.unmask 878 total
once you get started, it's hard to stop. i consider myself moderately sane.
my keywords file contains (besides modular X.org) a lot of the stuff i use regularly, including Quanta, Konqueror, and KDevelop 3.5, amaroK fast forward, and vim 7. most of them are version-specific so i don't ultimately pollute my system, but i still can't help but wonder whether i should switch to unstable.
You mean at load time yeah. Presumably you write your code, then quit and restart vim?
certainly not. saved scripts can be:sourced so there's no reason to quit for the sake of a script. anyway, scripts are evaluated as commands at runtime. you can enter a new function as a: command.
Can someone tell me how easy is it to extend vi/vim? I know it's in the manual and all that, but this is a question about the workflow. Can I define a function to be called anytime I want in vi/vim? In Emacs, it's quite trivial:
C-x b
That's control-x b, to change buffer...
:n and:p to switch between open buffers. there is also the whole:b family of commands for switching, splitting, opening, closing, etc. buffers.
*scratch* ... to change to scratch (as in scratchpad)
:badd scratch is one way.:sbl will reveal the new buffer in a split window. ^W commands switch between splits. i'm sure there's another kind of scratch pad you can open as well.
(defun blah (arglist) (interactive) (...))
just type away the function,... is the required action - it's just code.
function foo()
let yourcode = 'be'
endfunction
C-x C-e
evaluate last-sexp. No need to compile. No need to make or whatnot.
no equivalent, AFAIK. Vim scripts are evaluated at runtime.
To run it now,
M-x blah
:foo
That's it. That takes no effort at all. This can be bound to a key by M-x local-set-key (tab completion is your friend here). For frequently used functions, save it in ~/.emacs
:map <key> foo
Or alternatively,
C-x (
to start defining a keyboard macro.
... keystrokes...
type your commands here, put some thought into this, could be tricky
C-x )
end keyboard macro
qx (note no ':' ) begins defining a key recording assigned to 'x'.
pressing q again ends the recording definition.: commands can be added to the recording as well. all keypresses are trapped.:q will terminate the recording without saving it.
C-x e
Execute keyboard macro, subsequent e to repeat keystroke sequence.
@x will execute the recording named 'x'. @@ will execute the previously-executed recording.. will repeat a previous action. all of these commands can be preceded by a count for the number of times to repeat the action.:<range>@@ is equivalent over a range, repeating the recording on every line in the range.
of course, being fairly new to Vim myself, i know i have much to discover.:)
Re:Never more than one key at a time?
on
Vim 7 Released
·
· Score: 1
So how do you manage with the everpresent colon in commands? I know, I know, different paradigm, get used to it and all that, but whose bright idea was to require SHIFT for command-mode expressions like:q? Semi-colon I would understand, but the colon is a bit much.
on my jp109 layout, : is on another key next to ; which requires " and ' to be elsewhere, but i find it quite easy to deal with.:)
but on my us104 keyboards, of course, it can be a little annoying. especially switching between the two.
Re:I HATE VI. Convince me otherwise.
on
Vim 7 Released
·
· Score: 4, Informative
...does Vim do all the stuff jEdit can do?
in a word, yes.
more specifically, Vim can do everything Emacs can do, and has a lot of features i find every other editor lacking in. there's even an IRC client.
Line Numbering,
:se nu or:set number
Folding,
there are lots of ways to do it. there is also a good deal of built-in support that works with most of what you'd do out-of-the-box. (note: i don't use folding much, but i instead rely on '%' to jump around and '#' or '*' to find definitions.)
Bracket Scope Highlighting
in the standard distribution of Vim in Gentoo, that's on by default. as you type, opposing brackets are highlighted and missing pairs are marked with color. elsewise, you can use '%' to find matching parens, brackets, braces, whatever very quickly.
... What's with search and replace across directories, etc.
Or is it that one is expected to use other CLI tools for that?
personally, i find sed to be more than adequate for the job. if you want integration in your editor, these commands might work:
...although if you want to modify files not already open in the editor, again, sed works just as well and can be run from within vim with:!. of course, being somewhat of a fairly new user to Vim (only been using it for a couple years now), i'm always learning new features.
Right now, I see three genres of anime that are on TV:
1) actual new stories
Air, Ranma 1/2, Samurai Deeper Kyo, Rurouni Kenshin, and a number of others spring to mind which all explore different genres and bring something unique to the table. Given a few minutes, I could probably list dozens of groundbreaking new shows.
2) giant robots - same old shows, but now designed to get kids to buy giant robot action figures to play with.
I have to say that Evangelion and RahXephon are a major break from the Macross and Gundam generations - where the "giant robots" are more than mere machines: they are biomechas. That said, the genre, IMHO, is far more varied than you give it credit. Ihe stuff you see on Adult Swim is nothing like the new series coming out on DVD and Japanese TV right now.
3) cards/animals/toys that help people fight or fight themselves. Designed to get kids to buy cards/animals/toys because those things make the kid better at the things the characters on the show do, and therefore better people.
Pokemon, Digimon, Card Captor Sakura, Yu-Gi-Oh!, and their ilk are an abomination of American marketing. They're victims of their own success, propelled forward by their artificial popularity in the US and elsewhere. I can't help but wonder how much better Pokemon might have been had it not caught on in such a big way here.
It almost feels to me as if anything that makes it to CN is going to become over-marketed and capitalized on by everyone.
I dunno, I think I'll just keep watching things like Genshiken, GunGrave, Those Who Hunt Elves, Orphen, Gunslinger Girl.... shows not completely mainstream, but that hold their own.
i rarely, if ever, see the problems i hear everyone complaining about. i get zero lag on my servers (Zuluhed and Destromath), nearly all of the bugs i've run into i can rightly blame on Cedega, and the only downtime i ever experience is when the authentication server crashes.
then again, i play only a few hours per week (or a few hours per day at most), so my chances of seeing downtime are few and far between.
IMO, if you're going to complain about downtime, you really ought to look at how often you play - and stop hammering the servers. go do something else when something breaks. i'm tired of hearing everyone bitch about things i never see.
Ha... I have 8 mbit/768 kbit from Comcastoff. Hurray for the $55/month bill. Seriously, I've been considering some of Speakeasy's packages. Only 1.5 mb/sec, but it's symmetric which would be helpful since I run a game server, and the people I know that use Speakeasy tell me that they don't care what the hell you do with your connection. It's your money, and your fat pipe.
i have the 8mbit package, too, but my real speed is more like 10mbit/852kbit. there's also the rumor that ComCast will be upgrading us to 16mbit. the upload is likely the stay low tho.:(
the only problem, IMO, with Speakeasy is that they are limited by the local telco and your CO. Qwest tells me i'm close enough to my CO to get 7/1 service, but i'm unlikely to because of line quality. (which, IMO, is utter bullshit since they *STILL* haven't rolled out VDSL *ANYWHERE* in their service region. yeah, i know, old copper, but FFS, where's my VDSL?)
anyway, i'd suggest looking into getting a colo or something for your game server. that, or fiber. the setup fee hurts ($800 for fiber where i live - and it's 15 feet from my front door) but it's actually quite reasonable monthly (~$60/mo for a dedicated or colo with a full 100mbit port at one of the local datacenters - just one floor down from where i work). it's a win-win situation, since your players will love you and you will love having that extra bandwidth.:)
no, i'm serious.
when they realize that "hackers" are what make all their doodads work, they'll come crying back to us for help.
then we can secede from the rest of society and parcel out our own bit of land where we get all the fat pipes we want!
Quite the contrary! SMB and CIFS are industry-accepted standards. It just turns out Microsoft doesn't follow their own specs.
Bash also has this wonderful feature that is activated by the tab key. A lot of people call it "tab-completion". Use it.
Well, a few suggestions:
Your example fixed:
There are a lot of other fancy things to learn, but at least you can get the simple stuff right now.
You've hit on exactly the problems that ofice suites like OpenOffice.org and KOffice, etc. run into when trying to import or export Word files. You're right that there's nothing stopping anyone from supporting one format or another... However, as an example, Microsoft changes the format of Word files with every version of Office, adding and removing features and changing the binary signature of the file. This requires more effort spent at every new release, reverse-engineering the file format and hopefully finding that one critical detail that defines this text is bold.
Microsoft has come out with an "open standard". OpenXML. They're pushing it through ECMA with the hope that it will become an ISO standard. They were a bit slow in the motions, as OpenDocument has already become an ISO standard: ISO/IED 26300.
The problem is that Microsoft's definition for their XML document standard is so complex and over-engineered, and its licensing so damn confusing, that it's impossible to know whether your implementation of an OpenXML reader or writer is actually legal. The license requires that the implementation be complete, and the definition for that term is so vague as to make it unclear if a conforming implementation will even work along side Microsoft's Word.
On the other hand, OpenDocument is clear enough that it's easy to see whether a conforming implementation is complete, as it's guaranteed to be compatible with any other implementation.
And Microsoft has stated that they will not implement or distribute an ODF plugin for Word. Ever.
Wrong. Settling on one standard ensures total compatiblility across all platforms and in all circumstances. This means that one computer in a Mac OS X office will be able to exchange documents seamlessly with a Linux computer in another office and those two legacy Windows boxes in another. Seamlessly being the key word.
Because Microsoft has comitted to not supporting ODF, this creates a bit of friction in that suddenly there is guaranteed incompatibility between Microsoft's Word and any other office suite that supp
or, if you have a recent video card, you can play WoW in Linux! (like i do.)
it's off by default.
:D
first thing i do on any windows system i use is to set Quick Edit and Quick Paste, and modify every shortcut that opens a console.
at least on linux, it actually works out of the box.
maybe they should get hosting with HavenCo?
:D
once you get started, it's hard to stop. i consider myself moderately sane.
my keywords file contains (besides modular X.org) a lot of the stuff i use regularly, including Quanta, Konqueror, and KDevelop 3.5, amaroK fast forward, and vim 7. most of them are version-specific so i don't ultimately pollute my system, but i still can't help but wonder whether i should switch to unstable.
awesome. i'll take a good look at this when i get home. thanks!
more than you might think. i've been looking for a good make replacement myself.
Konqueror stable passes the test since version 3.5.0. current stable is 3.5.2.
http://www.vim.org/scripts/script.php?script_id=17 2
certainly not. saved scripts can be :sourced so there's no reason to quit for the sake of a script. anyway, scripts are evaluated as commands at runtime. you can enter a new function as a : command.
function foo()
let yourcode = 'be'
endfunction
no equivalent, AFAIK. Vim scripts are evaluated at runtime.
qx (note no ':' ) begins defining a key recording assigned to 'x'.
pressing q again ends the recording definition.@x will execute the recording named 'x'. @@ will execute the previously-executed recording. . will repeat a previous action. all of these commands can be preceded by a count for the number of times to repeat the action. :<range>@@ is equivalent over a range, repeating the recording on every line in the range.
of course, being fairly new to Vim myself, i know i have much to discover. :)
...wha? how come no one told me this? 'splain!!1!
on my jp109 layout, : is on another key next to ; which requires " and ' to be elsewhere, but i find it quite easy to deal with. :)
but on my us104 keyboards, of course, it can be a little annoying. especially switching between the two.
in a word, yes.
more specifically, Vim can do everything Emacs can do, and has a lot of features i find every other editor lacking in. there's even an IRC client.
there are lots of ways to do it. there is also a good deal of built-in support that works with most of what you'd do out-of-the-box. (note: i don't use folding much, but i instead rely on '%' to jump around and '#' or '*' to find definitions.)
in the standard distribution of Vim in Gentoo, that's on by default. as you type, opposing brackets are highlighted and missing pairs are marked with color. elsewise, you can use '%' to find matching parens, brackets, braces, whatever very quickly.
personally, i find sed to be more than adequate for the job. if you want integration in your editor, these commands might work:
:argdo %s/foo/bar/
:bufdo %s/foo/bar/
:windo %s/foo/bar/
:!. of course, being somewhat of a fairly new user to Vim (only been using it for a couple years now), i'm always learning new features.
...although if you want to modify files not already open in the editor, again, sed works just as well and can be run from within vim with
Air, Ranma 1/2, Samurai Deeper Kyo, Rurouni Kenshin, and a number of others spring to mind which all explore different genres and bring something unique to the table. Given a few minutes, I could probably list dozens of groundbreaking new shows.
I have to say that Evangelion and RahXephon are a major break from the Macross and Gundam generations - where the "giant robots" are more than mere machines: they are biomechas. That said, the genre, IMHO, is far more varied than you give it credit. Ihe stuff you see on Adult Swim is nothing like the new series coming out on DVD and Japanese TV right now.
Pokemon, Digimon, Card Captor Sakura, Yu-Gi-Oh!, and their ilk are an abomination of American marketing. They're victims of their own success, propelled forward by their artificial popularity in the US and elsewhere. I can't help but wonder how much better Pokemon might have been had it not caught on in such a big way here.
It almost feels to me as if anything that makes it to CN is going to become over-marketed and capitalized on by everyone.
I dunno, I think I'll just keep watching things like Genshiken, GunGrave, Those Who Hunt Elves, Orphen, Gunslinger Girl.... shows not completely mainstream, but that hold their own.
i rarely, if ever, see the problems i hear everyone complaining about. i get zero lag on my servers (Zuluhed and Destromath), nearly all of the bugs i've run into i can rightly blame on Cedega, and the only downtime i ever experience is when the authentication server crashes.
then again, i play only a few hours per week (or a few hours per day at most), so my chances of seeing downtime are few and far between.
IMO, if you're going to complain about downtime, you really ought to look at how often you play - and stop hammering the servers. go do something else when something breaks. i'm tired of hearing everyone bitch about things i never see.
don't like it? don't play.
hey now. that's an oxymoron. you can't be evangelical and fundamentalist. evangelicals are freak shows. the fundamentalists are just fucking nuts.
i speak as a Christian of evangelical upbringing.
i have the 8mbit package, too, but my real speed is more like 10mbit/852kbit. there's also the rumor that ComCast will be upgrading us to 16mbit. the upload is likely the stay low tho. :(
the only problem, IMO, with Speakeasy is that they are limited by the local telco and your CO. Qwest tells me i'm close enough to my CO to get 7/1 service, but i'm unlikely to because of line quality. (which, IMO, is utter bullshit since they *STILL* haven't rolled out VDSL *ANYWHERE* in their service region. yeah, i know, old copper, but FFS, where's my VDSL?)
anyway, i'd suggest looking into getting a colo or something for your game server. that, or fiber. the setup fee hurts ($800 for fiber where i live - and it's 15 feet from my front door) but it's actually quite reasonable monthly (~$60/mo for a dedicated or colo with a full 100mbit port at one of the local datacenters - just one floor down from where i work). it's a win-win situation, since your players will love you and you will love having that extra bandwidth. :)
well, they did release LGPL'd software... (illegally)
at first glance, i thought you were a stack machine. and then i thought, "my God, he's huge!"