Search:

Type: Posts; User: schragge; Keyword(s):

Page 1 of 10 1 2 3 4

Search: Search took 0.02 seconds.

  1. Replies
    4
    Views
    566

    Re: loop with grep function

    Try

    sort -k1,1 Bureau/taxa | join <(sort -k1,1 Bureau/conc_5genes.fas) -
    or, if both files are already sorted on the common field, just

    join Bureau/{taxa,conc_5genes.fas}
  2. Thread: php array

    by schragge
    Replies
    3
    Views
    647

    Re: php array

    foreach ($projects as $id => $project) {
    echo "id\t";
    foreach (array_keys($project) as $key) {
    echo "$key\t";
    }
    echo "\n";
    echo "$id\t";
    foreach ($project as...
  3. Replies
    2
    Views
    603

    [ubuntu] Re: Indentation issues with python

    Just a wild guess:


    class EventHubClient(object):
    def sendMessage(self,body,partition):
    eventHubHost = "pac-ns.servicebus.windows.net"
    httpclient =...
  4. Re: gtk error FB reader: cannot access `gtk': No such file or directory

    I'm not quite sure what are you trying to do. To compile the latest version of fbreader (currently 0.99.4 beta) from source? But it uses Qt4 and doesn't support GTK anymore. To compile from source...
  5. Replies
    4
    Views
    458

    Re: Redirect to X11 :0

    You can put several sed commands into one sed call:

    sed 's/./& /g; s/,/comma/g; s/@/at/g; s/$/Return/' /dev/ttyUSB1
  6. Replies
    4
    Views
    458

    Re: Redirect to X11 :0

    I guess some combination of a command-line X clipboard manipulation tool like xclip or xsel with an input automation tool like xdotool or xmacroplay may do the trick.
  7. Re: glib.h Make error --- ompiling ZLGtkTime.o ...ZLGtkTime.cpp:20:18: fatal error: g

    This will install build-dependencies of fbreader, among them libgtk2.0-dev and libglib2.0-dev:

    sudo apt-get build-dep fbreader
  8. Replies
    6
    Views
    840

    [SOLVED] Re: bash equivalent preg_match_all

    html2 is rather picky about HTML syntax. Try it this way


    content=$(wget -q -O - http://developer.android.com/sdk | sed '/ id="Other"/,$!d')
    echo "$content" |
    html2 2>/dev/null |
    sed -n...
  9. Replies
    6
    Views
    840

    [SOLVED] Re: bash equivalent preg_match_all

    html2 is part of xml2 package

    sudo apt-get install xml2
  10. Replies
    6
    Views
    840

    [SOLVED] Re: bash equivalent preg_match_all

    Parsing HTML with bash/sed/awk is rather complicated and very error-prone. Better do it with a real scripting language like perl/python/ruby. They have special library modules for this. If you insist...
  11. Replies
    53
    Views
    1,975

    Re: Bash Script, stopping the stops

    inifile=/etc/php5/fpm/php.ini
    if grep -qw 'cgi\.fix_pathinfo' "$inifile"
    then
    sed -i 's/^[ \t;]*\(cgi\.fix_pathinfo\)[ \t]*=.*/\1=0/' "$inifile"
    else
    echo 'cgi.fix_pathinfo=0'...
  12. Replies
    4
    Views
    576

    Re: Make system choose password from file

    A simpler and more reliable sed expression would be

    sed -i '$d;1i '"$last" BadPasswords.txt
  13. Replies
    7
    Views
    1,185

    [SOLVED] Re: color coding terminals in ksh

    You may have had alias definitions like

    alias ls='ls --color=auto'
    either directly in ~/.bashrc or in some file like ~/.bash_aliases that got sourced from ~/.bashrc.

    Does
    ls --color=auto...
  14. Replies
    53
    Views
    1,975

    Re: Bash Script, stopping the stops

    Since you're using bash anyway, have you looked into possibility of using select for it? It's less flexible than a while loop with read, but may be adequate for you needs. Here is an example of how...
  15. Replies
    7
    Views
    1,185

    [SOLVED] Re: color coding terminals in ksh

    It depends on what ksh flavor is used. The startup file is ~/.kshrc for ksh93, but ~/.mkshrc for mksh. For both shells, it only gets executed if $ENV is not defined, otherwise the file pointed to by...
  16. Replies
    7
    Views
    1,185

    [SOLVED] Re: color coding terminals in ksh

    Color scheme has nothing to do with the shell being used. I'm not sure what you really mean by this. That the settings in ~/.bashrc and/or ~/.bash_profile for color prompt and similar things don't...
  17. Re: Would it be possible to integrate the latest GnuCash (2.6.5) please

    Version 2.6.5 is available from GetDeb. It is an unofficial package, however.
  18. Re: problem in compiling qtstalker from source

    qtstalker was removed from Debian (and thus from Ubuntu) as part of transition from Qt3 to Qt4. It's still present in precise (Ubuntu 12.04 LTS) repository, however. If you have Ubuntu 12.04 you can...
  19. Replies
    3
    Views
    385

    [SOLVED] Re: Need help with C

    See this thread. As a quick and dirty hack you may try

    scanf(" %c", &opr);
  20. Thread: Csv help

    by schragge
    Replies
    2
    Views
    418

    Re: Csv help

    You manipulate data one line at a time. Different pieces of information (company name, address, email etc.) are on separate lines in the input file. The sed command sequence

    sed...
  21. Replies
    4
    Views
    624

    Re: C profiled libraries

    I usually use apt-file to find out what uninstalled package contains the file I'm interested in. In this case the command would be

    apt-file find /libc_p.a
  22. [SOLVED] Re: linux-image-3.13.0-43-generic does not install

    Jan 13 18:46:13 MilkyWay kernel: [ 1120.924987] Sense Key : Medium Error [current] [descriptor]
    Jan 13 18:46:13 MilkyWay kernel: [ 1120.924993] Descriptor sense data with sense descriptors (in hex):...
  23. [SOLVED] Re: Command substitution problem with bash, sqlite3

    See this post and this answer. What you get after $cmd gets expanded to its value is equivalent of

    result=$(sqlite3 test.db \"select col1, col2 from table1;\")
    In bash, you should use an array...
  24. Replies
    53
    Views
    1,975

    Re: Bash Script, stopping the stops

    Yep.


    Either this or >"$LOGFILE" 2>&1


    $LOGFILE is not the name of logfile, it's just a variable that logfile name happens to be kept in. At the beginning of your script, you assign this...
  25. Re: Strange netstat output - tcp connections on high ports?

    See this answer.
Results 1 to 25 of 250
Page 1 of 10 1 2 3 4