Home Page   #compiz-fusion  #kubuntu  #freebsd  #linux  #debian  #fedora  #gentoo  #bash  #suse  #vim  #slackware  #ubuntu  
Reliable $1 Web Hosting by 3iX

Channels


#bash

03 January 2008


Total 2 pages. You are browsing page 1/2.

First :: Prev :: [1] [2] [3] [4] [5] [...][...] [-2] [-1] [0] [1] [2] :: Next :: Last

--- Log opened Thu Jan 03 00:00:09 2008
00:03 <****> how can I get just the 3849? this give me "~3849" : echo '_approximateRevision = "~3849"' |awk -F= '/^_approximateRevision/ {print $2}'
00:04 <****> #awk
00:04 <****> woa. thanks.
00:10 <****> CarlfFK: is "~" always present? In this case why don't you try something like: echo '_approximateRevision = "~3849"' | sed '/^_approximateRevision/ s/.*\"~\(.*\)\"/\1/'
00:11 <****> trumpen: already resolved in #awk, in both awk and sed.
00:11 <****> curl http://trac.dabodev.com/browser/trunk/dabo/__version__.py?format=txt | awk -F= '/^_approximateRevision/ { gsub(/[~" ]/, "", $2); print $2 }
00:11 <****> yup. thanks though
00:11 <****> oops, sorry :=
00:11 <****> no prob - would rather have 2 answers than none
00:12 <****> some times you learn more
00:12 <****> trumpen: it's okay, nevermind - just telling :)
00:12 <****> ok ;)
00:18 <****> I'm typing perl -Ilib t/[tab][tab][tab] and bash isn't showing me possible completions of that line
00:18 <****> ls t/[tab][tab][tab] works fine
00:18 <****> anyone know what could be set wrong?
00:18 <****> you type erl instead of ython :)
00:19 <****> I don't believe that was related to my question
00:19 <****> hilariously, it does work fine if I type 'python' instead of 'perl'
00:20 <****> lol
00:20 <****> told you. :)
00:20 <****> hmmm
00:20 <****> so that means it's something magical in the completion system that's not working right
00:20 <****> yup
00:20 <****> lol
00:20 <****> lastes version of ubuntu has extra bash completin magic
00:20 <****> using debian
00:21 <****> so yeah, probably the same magic
00:21 <****> but... bash is bash
00:21 <****> yeah
00:21 <****> unless someone wants to claim that this isn't bash's fault
00:21 <****> CarlFK: does it complete parameters too ?
00:21 <****> and I caught some mention of it in the dango install
00:21 <****> Torchwood: yes.
00:21 <****> i see ...
00:22 <****> just out of interest. how does it know what the allowable parameters are ?
00:23 <****> "If you use the Bash shell, consider installing the Django bash completion script, which lives in extras/django_bash_completion in the Django distribution." http://www.djangoproject.com/documentation/django-admin/
00:24 <****> ill dig that out...
00:24 <****> i prefer the "shopt -s what_i_meant" setting tbh
00:25 <****> http://code.djangoproject.com/browser/django/branches/magic-removal/extras/django_bash_completion?rev=2742
00:25 <****> i guess.
00:26 <****> just because I saw it doesn't mean i understand it :)
01:00 <****> somefile (aka put the line at the top of the file)
01:01 <****> chuck
01:01 <****> chuck: A command-based text editor. See http://bash-hackers.org/wiki/doku.php?id=howto:edit-ed and http://sdf.lonestar.org/index.cgi?tutorials/ed
01:01 <****> somefile.new
01:02 <****> What should I use on scripts: #!/bin/bash or #!/bin/sh?
01:02 <****> Why?
01:02 <****> RenatoSilva: Depends on what you want to do.
01:02 <****> If you want a bash script, then eh, use #!/bin/bash :)
01:03 <****> go|dfish: an outline please
01:03 <****> go|dfish: why would I want bash or sh? I don't know
01:03 <****> I guess #!/bin/sh is used when one wants to write portable scripts.
01:04 <****> go|dfish: I want whatever, I just want to run a script
01:04 <****> Then bash should be fine.
01:05 <****> bash is just sh with lots of extra bells and whistles
01:05 <****> sh is more portable though. not every system has bash - or the latest version of bash
01:06 <****> p.s. on many modern Linux distros, like RHEL, sh is just a link to bash
01:06 <****> quite often, bash is symlink....yeah. Someone beat me to it
01:06 <****> if you don't know what is bash-specific, what is POSIX, and what is Bourne shell, you should probably use #! /bin/bash
01:06 <****> go|dfish: portable, ok
01:06 <****> Time I went, anyhow.
01:07 <****> thqnk you everyone
01:21 <****> hi. i have a text list of files i need to copy to a folder. anyone know of an easy way to accomplish this?
01:21 <****> they're delimited by newlines
01:21 <****> !read
01:21 <****> http://bash-hackers.org/wiki/doku.php?id=commands:builtin:read
01:21 <****> !faq read
01:21 <****> http://wooledge.org/mywiki/BashFAQ/001 -- How can I read a file line-by-line?
01:21 <****> that's the one
01:21 <****> ty
01:22 <****> or cpio -p
01:31 <****> I need help installing the bash shell.
01:31 <****> Administration: on what distro?
01:31 <****> Mac OS 9 or 8.6.
01:32 <****> bah, no idea - sorry
01:32 <****> I'm a developer.
01:32 <****> I really need this.
01:32 <****> how to make 'ed' understand \n?
01:32 <****> Administration: sure it's not bundled?
01:33 <****> I suppose I can just put a telnet client on the Mac OS 8/9 machines and access the OpenBSD server.
01:33 <****> try just typing bash at the shell
01:33 <****> Administration: telnet, wtf?
01:33 <****> SSH!
01:33 <****> There's no shell in Mac OS 8.
01:33 <****> davedoom: Or an OpenSSH client.
01:33 <****> Err, Daviey.
01:34 <****> Maybe I can implement something like MinGW's Msys (Windows) for Mac OS Classic.
01:34 <****> I'm certain google must have the answer
01:34 * Daviey isn't a mac user - no idea, the lack of 2 mouse buttons scares me
01:35 <****> hehe
01:35 <****> The lack of a shell is scares me.
01:38 <****> what's wrong with ed's command g/exit 0/d\nw?
01:38 <****> what's wrong with ed's command g/exit 0/d\nw?
01:39 <****> RenatoSilva: nothing, assuming that \n is really a newline
01:39 <****> RenatoSilva: how are you running that command?
01:42 <****> \amethyst: the w command do what?
01:43 <****> RenatoSilva: writes the file
01:48 <****> \amethyst: humm
01:49 <****> \amethyst: and how to pass a string "\n" to ed through "echo -e" command?


Total 2 pages. You are browsing page 1/2.

First :: Prev :: [1] [2] [3] [4] [5] [...][...] [-2] [-1] [0] [1] [2] :: Next :: Last