Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
dont skimp on the shrimp
Apr 23, 2008

:coffee:
Can't you just do it with sed?

Something like 'sed s/"is not"/"isn't"/ file > target'?

Adbot
ADBOT LOVES YOU

thiscommercialsucks
Jun 13, 2009

by T. Mascis

Crush posted:

Is it possible to take a list of phrases and words like this:

code:
"is not" "isn't"
"are not" "aren't"
...
This is one of those things where I would say gently caress it, open up Notepad2, and use Replace. I say Notepad2 because it lets you use regex, in case you need some flexibility.

Lonely Wolf
Jan 20, 2003

Will hawk false idols for heaps and heaps of dough.
use sed to rewrite it as a sedscript to rewrite whatever.txt
code:
$ <rules sed 's/"\(.*\)" "\(.*\)"/s@\1@\2@g/g' >rules.sed
$ sed -i -frules.sed whatever.txt

Crush
Jan 18, 2004
jot bought me this account, I now have to suck him off.
Thanks, will do!

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO
Can anyone recommend a nice scripting (semi-)IDE for Linux/Unix? I used to use the Jed editor, Quanta+ and a customised version of ColdFusion Studio; all mainly for PHP, but haven't touched them in years and don't know anything about stuff introduced after HTML layers. I don't need a full WYSIWYG thing; just something with a useful code library and nice colour tagging that'll let me have a peek at the final results now and then.

spiritual bypass
Feb 19, 2008

Grimey Drawer
Netbeans and Firefox/Firebug do all of that well for me.

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

rt4 posted:

Netbeans and Firefox/Firebug do all of that well for me.

Thanks, I'll try that.

e: Netbeans is just what I wanted

Underflow fucked around with this message at 17:22 on May 2, 2011

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

What's the best vim resource(s) out there? Tutorials, tips, customization...I can 'get around' in it but I wouldn't say I know "how to use" vim.

Did That on Television
Nov 8, 2004
lemonparties with wippersnapper
Is it still better to just get rid of PulseAudio? It still doesn't play nice with foobar2000 (v1.0.6) under WINE (1.3) and that is a huge problem for me.

text editor
Jan 8, 2007

Bob Morales posted:

What's the best vim resource(s) out there? Tutorials, tips, customization...I can 'get around' in it but I wouldn't say I know "how to use" vim.

The vim 'wiki' at http://vim.wikia.com/wiki/Vim_Tips_Wiki

Also, for customization, sometimes it's cool to look through people's configs at sites like dotfiles.org and copying whatever looks useful

dont skimp on the shrimp
Apr 23, 2008

:coffee:

Did That on Television posted:

Is it still better to just get rid of PulseAudio? It still doesn't play nice with foobar2000 (v1.0.6) under WINE (1.3) and that is a huge problem for me.
Sometimes, wine doesn't play nice with pulse. What you can do is, use winecfg, switch to OSS output only, then you use padsp to launch wine.

Ergo, simply replace 'wine' with 'padsp wine' in your shortcuts, menus, or whatever you use to launch it. :)

(You could also give this a try, friends who like foobar seems to like that too)

Did That on Television
Nov 8, 2004
lemonparties with wippersnapper

Zom Aur posted:

Sometimes, wine doesn't play nice with pulse. What you can do is, use winecfg, switch to OSS output only, then you use padsp to launch wine.

Ergo, simply replace 'wine' with 'padsp wine' in your shortcuts, menus, or whatever you use to launch it. :)

(You could also give this a try, friends who like foobar seems to like that too)

Oh,hey, thanks! I meant to post this in the Ubuntu thread but this worked out well all the same, haha. This seems to have done the trick thus far. :)

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

Bob Morales posted:

What's the best vim resource(s) out there? Tutorials, tips, customization...I can 'get around' in it but I wouldn't say I know "how to use" vim.

This is just a quick reference, but it covers useful stuff. Don't know who wrote it or where I got it from:

pre:
     a                Add text after the cursor.
     A                Add text to the end of the current line.
     i                Insert text at the cursor.
     I                Insert text at the beginning of the current line.
     o                Open a new line below the current line and add text.
     O                Open a new line above the current line and add text.
     S                Substitute the letter underneath the cursor with letter you type.
     S or c           Delete the current line and substitute it with text you type.
     R or C           Replace current text with text you type.

     x                Delete the letter beneath the cursor.
     dw               Delete the letter beneath the cursor and the rest of the word.
   # dw               Delete the following number of words, including the current word.
     D                Delete from the cursor to the end of the line.
     dd               Delete the current line.
   # dd               Delete the following number of lines, including the current line.
     yy               Copy or "yank" the current line.
   # yy               Copy or "yank" the following number of lines, including the current line.
     p                Paste the current copied or deleted letters, words, or lines after the cursor.
     J                Join the next line with the current line (erases a carriage return).
     u                Undo the last edit.
     .                Redo the last editing command.

     j                Move down to the next line.
     k                Move up to the previous line.
     h                Move backward by letter.
     l                Move forward by letter.
     w                Move forward by word.
     b                Move backward by word.
     e                Move forward to the end of a word.
CTRL+F                Move forward to next screen.
CTRL+B                Move backward to previous screen.
CTRL+D                Move forward one-half of a screen.
     G                Move to the end of the file.
   # G                Move to the specified line number in the file.
     $                Move to the end of the current line.
     0                Move to the beginning of the current line.

     /                Search for a specified word.
     n                Search for next occurrence of specified word.
     N                Search for previous occurrence of specified word.

    :wq or ZZ         Save and quit out of the file.
    :w                Save the current file without quitting.
    :q                Quit if no edits have occurred.
    :q!               Quit without saving edits.

    :set nu           Show line numbers.
    :set nonu         Turn off line numbers.
    ^g                Display current line number/file name.
    /hello            Search forward (down) for "hello".
    ?hello            Search backward (up) for "hello".
     n                Search again, (same direction as original).
     N                Search again, (opposite direction as original).
    :s/dog/cat        Replace "dog" with "cat" (first occurrence of dog) on the current line.
    :1,$s/dog/cat/g   Replace "dog" with "cat" (every occurrence) for the entire file.
    :1,3s/dog/cat/g   Replace "dog" with "cat" on lines 1 -> 3 of the file, every occurrence.

vi                    Begin editing unnamed file.
vi file1              Begin editing file1.
vi file1 file2 file3  Begin editing 3 files, file1 will appear initially.
vi *.txt              Begin editing all files ending in '.txt'.
vi -r important.file  View file 'important.file' in read-only mode.
view important.file   Same as vi -r.

Note that the following commands are to be executed from command mode:

- If you started vi with more than 1 file name on the command line, you can type:
  :n
  to go to the next file in the list of files you supplied.

- If you have entered :n one or more times to move through a list of files, you can return to the first file (the initial file that appeared when you started vi) by typing:
  :rew

- You can list all the files that you gave vi on the command line (the current file will appear inside '[' ']') using the following command:
  :args

- Once vi is running, you can jump directly to a new file by typing:
  :e the.new.file.name

- While you are running vi, if you have changed the current file via:
  :rew, :e, :n
  you can swap back to the previous file using:
  :e#
  This is especially useful when you are entering long pathnames after :e
Sorry if too long or not what you're looking for.

deedee megadoodoo
Sep 28, 2000
Two roads diverged in a wood, and I, I took the one to Flavortown, and that has made all the difference.


I had this graphic hanging in my cube for a long time as a reference. It's pretty solid and organized well

http://jrmiii.com/2009/03/06/learning-vim-the-pragmatic-way.html

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO
Yeah, that looks nice.

darkhand
Jan 18, 2010

This beard just won't do!

Bob Morales posted:

What's the best vim resource(s) out there? Tutorials, tips, customization...I can 'get around' in it but I wouldn't say I know "how to use" vim.

I'm a big fan of https://www.vimcasts.org (Website layout is broke right now, it'll probably be up soon)

The dude's voice is hypnotic and he teaches you a lot of modal goodies. Something like http://vimcasts.org/episodes/modal-editing-undo-redo-and-repeat/ is a pretty good starting point.

Twlight
Feb 18, 2005

I brag about getting free drinks from my boss to make myself feel superior
Fun Shoe

HatfulOfHollow posted:

I had this graphic hanging in my cube for a long time as a reference. It's pretty solid and organized well

http://jrmiii.com/2009/03/06/learning-vim-the-pragmatic-way.html

Thanks for this.

Did That on Television
Nov 8, 2004
lemonparties with wippersnapper

Zom Aur posted:

Sometimes, wine doesn't play nice with pulse. What you can do is, use winecfg, switch to OSS output only, then you use padsp to launch wine.

Ergo, simply replace 'wine' with 'padsp wine' in your shortcuts, menus, or whatever you use to launch it. :)

(You could also give this a try, friends who like foobar seems to like that too)

Perhaps I spoke too soon. After having done this, I noticed that there is now some kind of distortion in the sound produced by foobar2000 (it's a clicking sound every couple of seconds). This was not happening in Ubuntu 10.10 when I removed PulseAudio and used ALSA exclusively, and it was also not the case in 11.04 under PulseAudio (on the other hand, despite this distortion, the audio at least plays through and does not randomly stop working)!

Maybe I should move this query into the proper Ubuntu thread?

other people
Jun 27, 2004
Associate Christ

Did That on Television posted:

Perhaps I spoke too soon. After having done this, I noticed that there is now some kind of distortion in the sound produced by foobar2000 (it's a clicking sound every couple of seconds). This was not happening in Ubuntu 10.10 when I removed PulseAudio and used ALSA exclusively, and it was also not the case in 11.04 under PulseAudio (on the other hand, despite this distortion, the audio at least plays through and does not randomly stop working)!

Maybe I should move this query into the proper Ubuntu thread?

Have you checked the winehq database entry for that program?

I hate to be "that guy," but if you can't find a native app for something as basic as an audio player, maybe you should try something else?

dont skimp on the shrimp
Apr 23, 2008

:coffee:

Did That on Television posted:

Maybe I should move this query into the proper Ubuntu thread?
Yeah, maybe. I know gnome3 depends on pulse, but I don't know if unity does. If it doesn't, you could try removing it, else you're stuck with it.

Or, as Kaluza-Klein said, look for a native player you like.

kyuss
Nov 6, 2004

After updating to Ubuntu 11.04 hibernating fails with a "PM: Not enough free memory" message.

Free RAM is 800/2048MB, free disk space is ~15GB. Any ideas how to solve this?

Quarantini
Aug 9, 2010
Does anyone know if the "snakeoil" default cert/key that is installed with apache is generated on the fly or is just a standard one across all installations? I'm trying to decide if I need to create a new self-signed cert or if the one that is already there is sufficient.

dont skimp on the shrimp
Apr 23, 2008

:coffee:

kyuss posted:

After updating to Ubuntu 11.04 hibernating fails with a "PM: Not enough free memory" message.

Free RAM is 800/2048MB, free disk space is ~15GB. Any ideas how to solve this?
Make sure you have a swap large enough to store the whole contents of the RAM. You should at least have a 2GB ram if you want to be able to hibernate.

(Unless you mean suspend-to-ram)

JHVH-1
Jun 28, 2002

Quarantini posted:

Does anyone know if the "snakeoil" default cert/key that is installed with apache is generated on the fly or is just a standard one across all installations? I'm trying to decide if I need to create a new self-signed cert or if the one that is already there is sufficient.

Don't think every distro has that so I am guessing it is generated at the time the package is installed.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

What are the cool kids using these days, as a KDE desktop?

I'm about to fire up OpenSUSE, Debian makes me angry and I'd like to avoid Ubuntu. I might try the re-spin of Fedora.

TheGopher
Sep 7, 2009
All the cool kids are using Arch in general, but not sure about specifically for KDE. Fedora is alright, and comes with good KDE support, but after using it daily for almost a year now my main gripes with it come from it not getting as much attention and support as Debian/Ubuntu.

I've only ever used Gnome, so I can't really speak about KDE. Each time I've tried KDE however, there was nothing about it that's really stood out to me as a reason to switch to it from Gnome. I don't need much fancy or flashy functionality out of my GUI, and besides OpenOffice, Pidgin, Remmina, a mail client, and Chrome, I don't really need a GUI.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

I just had F14 the way I wanted it with GNOME. But it just feels so...old. I honestly haven't given KDE a whirl in a very long time. Like since Caldera or something ancient.

spiritual bypass
Feb 19, 2008

Grimey Drawer
I use Arch and I'm pretty cool, but I use it for its straightforward and well-documented configuration more than its always up-to-date packages. I can't stand having GUI tools or a big annual upgrade gently caress things up when taking 5 minutes to learn to do it by hand would prevent all sorts of trouble.

TheGopher
Sep 7, 2009

Bob Morales posted:

I just had F14 the way I wanted it with GNOME. But it just feels so...old. I honestly haven't given KDE a whirl in a very long time. Like since Caldera or something ancient.

Yeah I know what you mean with it feeling old, but after awhile you stop noticing the aesthetics and solely focus on the functionality anyway.

Besides, if I were going to use an OS for "pretty" factor I would use OS X.

text editor
Jan 8, 2007
All the cool kids are using Arch and pulling the latest version of KDE from the AUR, and then adding on other cool looking KDE packages from the AUR until something breaks, which causes cascading breakings of the system until your last four hours of work are wasted :smith:


Also, version 13.37 of Slackware was released, and KDE is the default desktop if you want a small but decent challenge.

dont skimp on the shrimp
Apr 23, 2008

:coffee:

ClosedBSD posted:

All the cool kids are using Arch and pulling the latest version of KDE from the AUR, and then adding on other cool looking KDE packages from the AUR until something breaks, which causes cascading breakings of the system until your last four hours of work are wasted :smith:
Nah, there's also the kde-snapshots repo for those curious about the latest changes in KDE, but not wanting to waste hours compiling it themselves.

Bob Morales:
If you just want something "fresh" rather than something other than gnome, you could give the Fedora 15 beta a try. Gnome-shell and systemd should provide some interesting results.

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

ClosedBSD posted:

All the cool kids are using Arch and pulling the latest version of KDE from the AUR, and then adding on other cool looking KDE packages from the AUR until something breaks, which causes cascading breakings of the system until your last four hours of work are wasted :smith:


Also, version 13.37 of Slackware was released, and KDE is the default desktop if you want a small but decent challenge.

Don't they ask you anymore in the setup script after install? Recent Slack usually came with Windowmaker/NextStep, Xfce, Blackbox, Fluxbox, Fvwm and Twm too.

Btw, why is it that KDE won't escape to the command line using Ctrl+Alt+F*? Nothing in its default keybindings seems to occupy the combo, but it doesn't works for me in 3.5.9 on Slack 12.1

Not a big fan of KDE (too many idiosyncracies compared to the more straightforward wm's), but it has some nice utilities. Seems to go down well with people coming from Win/Mac systems.

dont skimp on the shrimp
Apr 23, 2008

:coffee:

Underflow posted:

Btw, why is it that KDE won't escape to the command line using Ctrl+Alt+F*? Nothing in its default keybindings seems to occupy the combo, but it doesn't works for me in 3.5.9 on Slack 12.1
I'm not running it on slack, but that particular combo works just fine here. So I don't think it's a problem specific to KDE.

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

Zom Aur posted:

I'm not running it on slack, but that particular combo works just fine here. So I don't think it's a problem specific to KDE.

Weird; for me it is. I escape out of all other wm's just fine.

text editor
Jan 8, 2007

Underflow posted:

Don't they ask you anymore in the setup script after install? Recent Slack usually came with Windowmaker/NextStep, Xfce, Blackbox, Fluxbox, Fvwm and Twm too.

Btw, why is it that KDE won't escape to the command line using Ctrl+Alt+F*? Nothing in its default keybindings seems to occupy the combo, but it doesn't works for me in 3.5.9 on Slack 12.1

Not a big fan of KDE (too many idiosyncracies compared to the more straightforward wm's), but it has some nice utilities. Seems to go down well with people coming from Win/Mac systems.

Yeah it still comes with all those WMs, I just meant the KDE had always seemed to be the "preferred" one for Slackware users.


Also, I don't know much about the Ctrl+Alt+F thing, since I'm always on Gnome or XFCE, even on Slackware. KDE isn't worth the hassle, and all the extra clutter and space taken up by the KDE menus usually means I'll be missing 1-2 lines of code in any text editor I'd have open.

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

ClosedBSD posted:

Yeah it still comes with all those WMs, I just meant the KDE had always seemed to be the "preferred" one for Slackware users.


Also, I don't know much about the Ctrl+Alt+F thing, since I'm always on Gnome or XFCE, even on Slackware. KDE isn't worth the hassle, and all the extra clutter and space taken up by the KDE menus usually means I'll be missing 1-2 lines of code in any text editor I'd have open.

Xfce is the best hands down, though it took a while for it to get fleshed out featurewise. I never seriously used KDE since Slackware 9.0 came with that faulty compile (linked to the wrong libs, I think it was). Maybe the Ctrl/Alt/F* thing is another one of those cock-ups. Sure is pretty if you like lots of colours, though.

Little_Yellow_Duck
Feb 16, 2002
Who wears short shorts
How can I pipeline an output as a filename? As an example, if I wanted to open the last file in a list, I want something like
code:
tail -n1 filelist.txt | more
but I want the file returned, not just the filename.

Edit: \/ Sweet, that works a treat.

Little_Yellow_Duck fucked around with this message at 16:50 on May 4, 2011

text editor
Jan 8, 2007

Underflow posted:

Xfce is the best hands down, though it took a while for it to get fleshed out featurewise. I never seriously used KDE since Slackware 9.0 came with that faulty compile (linked to the wrong libs, I think it was). Maybe the Ctrl/Alt/F* thing is another one of those cock-ups. Sure is pretty if you like lots of colours, though.

I usually use Gnome since that's what's available immediately on the majority of distros, but about a year ago I went through the trouble of getting Debian stable running on my 4 year old laptop, and decided to go with XFCE with a few theme tweaks to darken in and minimize the menu bar. It was easily my favorite desktop Linux experience, very snappy and simple.

taqueso
Mar 8, 2004


:911:
:wookie: :thermidor: :wookie:
:dehumanize:

:pirate::hf::tinfoil:

Little_Yellow_Duck posted:

How can I pipeline an output as a filename? As an example, if I wanted to open the last file in a list, I want something like
code:
tail -n1 filelist.txt | more
but I want the file returned, not just the filename.

cat `tail -n1 filelist.txt` | more

e: http://tldp.org/LDP/abs/html/commandsub.html

taqueso fucked around with this message at 16:45 on May 4, 2011

Adbot
ADBOT LOVES YOU

Underflow
Apr 4, 2008

EGOMET MIHI IGNOSCO

ClosedBSD posted:

I usually use Gnome since that's what's available immediately on the majority of distros, but about a year ago I went through the trouble of getting Debian stable running on my 4 year old laptop, and decided to go with XFCE with a few theme tweaks to darken in and minimize the menu bar. It was easily my favorite desktop Linux experience, very snappy and simple.

Yes, it's really very nice. Solely thanks to Xfce I can still run a laptop from the last millennium and not get annoyed after 5m. Does everything you need and has none of the bloat or period fads of other WMs' older versions. I like the menu behaviour in v4.4. where non-Xfce components and 3rd-party apps including Wine installs are sensibly integrated without having to resort to appfinder or whatever it's called in KDE. Even KDE's utilities are directly accessible if you want them.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply