Search:

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

Page 1 of 10 1 2 3 4

Search: Search took 0.10 seconds.

  1. Re: nautilus script from the "search for" folder

    I tried a simple Nautilus script that redirected NAUTILUS_SCRIPT_SELECTED_FILE_PATHS to a text file, and I encountered the same issue as you describe when running the script on a file in what you...
  2. Replies
    6
    Views
    433

    Re: Python Looping question

    I'm just learning Python and thought I would suggest an approach that is only slightly different from that suggested by LemursDontExist. I have omitted the blank line in the output as that is what...
  3. Re: Bash script to rename files to a pattern of consecutive numbers

    The shell script was mine and was written when I was first learning shell scripts. The script was wrong in two respects, and I have deleted it. Thanks for the heads-up.
  4. Replies
    11
    Views
    770

    [SOLVED] Re: Korn Command Substitution Variable

    Deleted post.
  5. Replies
    10
    Views
    1,020

    [SOLVED] Re: Create CSV from text file

    The following will do what you want. If the source file is large, I suspect this is better done with sed or awk. Perhaps another forum member will be able to help if that is the case.


    ...
  6. [ubuntu] Re: SH: Sort various files by date of creation?

    Gmargo has already answered your question, but I thought I would mention one item. Your list of files contains a directory, and because of that gmargo's first solution may not work as you want. This...
  7. Replies
    22
    Views
    1,818

    [SOLVED] Re: shell-script count to variable

    By globs, I assume you are referring to the nullglob and dotglob shell options.

    Nullglob is needed because the "files" array variable will otherwise contain *.avi and *.mkv if no matching files...
  8. Replies
    22
    Views
    1,818

    [SOLVED] Re: shell-script count to variable

    deleted
  9. Replies
    22
    Views
    1,818

    [SOLVED] Re: shell-script count to variable

    You my want to consider using an array to count files in a directory. This will work with bash only.

    http://mywiki.wooledge.org/BashFAQ/004
  10. Replies
    1
    Views
    10,249

    Re: bash random string

    I came across the following command-line a while back. It produces eight random upper- and lower-case letters.


    tr -dc "[:alpha:]" < /dev/urandom | head -c 8
  11. Replies
    2
    Views
    1,302

    Re: Shell Scripting Array Error

    By starting your script with #!/bin/sh, you are using the dash shell, which does not support arrays. That is the reason for the error message. You do not receive the error message in a terminal...
  12. Replies
    12
    Views
    808

    Re: review my first script

    sh228 has covered the most important points on this issue, but the following contains a little additional information:

    http://mywiki.wooledge.org/BashFAQ/082
  13. Replies
    5
    Views
    840

    [SOLVED] Re: Time reminder script

    That looks good. I have included below the shell script as I would write it, but this is more a matter of style and preference than right or wrong. Also, my Bash skills are only middling, so there...
  14. Replies
    5
    Views
    840

    [SOLVED] Re: Time reminder script

    I tested the shell script and it seems to work fine. So, my comments are mostly items to consider.

    * Indent the script for improved readability. There are many guides on this topic--the first...
  15. Replies
    3
    Views
    631

    Re: Subtracting values in two files

    I do not know perl and cannot fully answer your question. Perhaps with this bump, another forum member will see this thread and be of help.

    For practice, I decided to write this as a bash shell...
  16. Replies
    8
    Views
    2,732

    [SOLVED] Re: (Bash) Script to randomize the order of names

    The OP has marked this thread as solved, but I wanted to use it as a learning aid to work on certain bash skills and thought I would post my final shell script.



    #!/bin/bash

    while true ; do...
  17. [SOLVED] Re: Copy/move random files from one directory to another

    I think this will do what you want. The find commands finds all files in the source directory and subdirectories. The sort command randomizes the list of files. The mapfile command creates an array...
  18. [SOLVED] Re: super easy BASH null if command line args question

    This whole issue is discussed under item 4 on the following page:

    http://mywiki.wooledge.org/BashPitfalls?highlight=%28\bCategoryShell\b%29

    It generally recommends that the x$var solution be...
  19. [SOLVED] Re: reading from a word list and picking a random word

    The Greg's Wiki site has an informative FAQ on this topic:

    http://mywiki.wooledge.org/BashFAQ/026
  20. Replies
    5
    Views
    2,960

    [ubuntu] Re: Nautilus Script: Image 2 PDF?

    On my computer, user-selected files are processed by a Nautilus script in the order that they are shown in the right pane of the Nautilus file browser. This order can, of course, be changed by...
  21. Replies
    5
    Views
    416

    [ubuntu] Re: Default variable

    You can use parameter expansion as explained in the Bash Reference Manual:



    http://www.gnu.org/software/bash/manual/bashref.html#Shell-Parameter-Expansion

    This same topic is discussed under...
  22. Replies
    3
    Views
    784

    Re: bad for loop syntax error

    Like TeoBigusGeekus, I tried your script and it works fine with bash. It does not work with dash (/bin/sh) which does not support arrays or ((...)). For more information:
    ...
  23. Replies
    7
    Views
    4,996

    [SOLVED] Re: Bash shell option extglob

    The trouble with [0-9]* is that it allows a number followed by one or more characters that are not numbers, which breaks the script. This is pretty unlikely, so I guess it's not important. Thanks...
  24. Replies
    7
    Views
    4,996

    [SOLVED] Re: Bash shell option extglob

    Thanks for the information--it explains things.

    I did manage to get the script working as I want using regular pattern matching. The input from the user is one or two digits, so I used:

    ...
  25. Replies
    27
    Views
    901

    Re: Presumably a quoting problem in BASH script

    It's a bit confusing, but it appears that the dog directory contains a space at the end. If that's the case, then you have a few options. One is to change into the dog directory before renaming so...
Results 1 to 25 of 250
Page 1 of 10 1 2 3 4