Search:

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

Page 1 of 10 1 2 3 4

Search: Search took 0.06 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
    695
    Views
    89,702

    [ubuntu] Re: What DELL model do you have?

    I just ordered a Vostro 460 with the i5-2400 processor and Intel HD graphics. I'm also getting a 23-inch Ultrasharp monitor. My existing Dell computer is 8-years old, so I'm looking forward to the...
  3. Replies
    6
    Views
    319

    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...
  4. 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.
  5. Replies
    11
    Views
    551

    [SOLVED] Re: Korn Command Substitution Variable

    Deleted post.
  6. Replies
    10
    Views
    767

    [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.


    ...
  7. [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...
  8. Replies
    22
    Views
    1,328

    [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...
  9. Replies
    22
    Views
    1,328

    [SOLVED] Re: shell-script count to variable

    deleted
  10. Replies
    22
    Views
    1,328

    [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
  11. Replies
    1
    Views
    7,981

    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
  12. Replies
    2
    Views
    874

    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...
  13. Replies
    12
    Views
    655

    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
  14. Replies
    5
    Views
    515

    [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...
  15. Replies
    5
    Views
    515

    [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...
  16. Replies
    3
    Views
    493

    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...
  17. Replies
    8
    Views
    1,216

    [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...
  18. [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...
  19. [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...
  20. [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
  21. Replies
    5
    Views
    2,498

    [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...
  22. Replies
    5
    Views
    321

    [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...
  23. Replies
    3
    Views
    623

    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:
    ...
  24. Replies
    7
    Views
    2,798

    [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...
  25. Replies
    7
    Views
    2,798

    [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:

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