Search:

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

Page 1 of 6 1 2 3 4

Search: Search took 0.04 seconds.

  1. Hoping to get some help on multithreading

    I'm trying to delve into the world of multithreading and I'm having some difficulty... Typical producer-consumer results in an IllegalMonitorException.


    public class Producer implements Runnable...
  2. Replies
    12
    Views
    782

    Re: What language to learn?

    Java, Java, Java! I like c/c++; however, it seems the job market is Java crazy particularly at entry level. Also a huge demand for web developers. HTML,CSS,JScript, and PHP are a good place to start....
  3. Replies
    0
    Views
    287

    create an init script

    I toying around with chef and box grinder and I've encountered a problem I'm trying to work around. I have an iscsi I'm trying to auto mount. Doing so thru the fstab doesn't do the trick. Any ideas...
  4. Replies
    5
    Views
    271

    Re: awk NR returning one less

    Assuming a user doesn't tweak the file itself there won't be any blank lines. The script takes information and stores it in a delimited file, and won't accept blank input so hopefully I'm covered =)...
  5. Replies
    5
    Views
    271

    Re: awk NR returning one less

    i just threw the wc in there, i ended up with



    while read line; do
    #echo -e "$(awk -F':' '{print NR, $1, $2, $3, $4}')"
    let count++
    echo $count $line
    done < <(awk -F':' '{print...
  6. Replies
    5
    Views
    271

    awk NR returning one less

    I'm building a script that accesses a file. I've currently put 8 records into the test data but when I try to list with line numbers I get 7 rather than 8...



    while read line; do
    echo -e...
  7. Replies
    6
    Views
    321

    Re: case and menus

    Ok so here goes, I'm making a menu driven program for a project and I'm looking for feedback. I still need to tighten up the error handling (if exists etc.) but I welcome any feedback. Please let me...
  8. Replies
    6
    Views
    321

    Re: case and menus

    main_menu_function()
    {
    while true
    do
    echo "********************************************************************************"
    echo "* Main Menu ...
  9. Replies
    6
    Views
    321

    Re: case and menus

    Let me see if I'm understanding and try to expand on what you've said...

    so in the case of 4) Exit have it set a parameter to whatever and check in the conditional statement to exit the script?
  10. Replies
    6
    Views
    321

    Re: case and menus

    echo "********************************************************************************"
    echo "* Main Menu *"
    echo "* ...
  11. Replies
    3
    Views
    430

    Re: while sum loop

    You end up with 5 + 4 + 3+ = sum using this method I managed a work around its ugly but I learned something lol
  12. Replies
    6
    Views
    321

    case and menus

    I'm trying to make a bash menu displaying options but it contains sub menus as well. Is there anyway to add an identifier that will display with the menu?

    Right now it displays

    Option 1
    Option...
  13. Replies
    3
    Views
    430

    while sum loop

    Kind silly but I'm getting an infinite loop passing command line args to a while loop and attempting to sum them with the output shown as

    var1 + var2 + var3 = sum

    while -z $1 do
    echo -n...
  14. Replies
    6
    Views
    370

    Re: bash variables line by lone from file

    #!/bin/bash

    #script to inform users of their expired account

    #declare variables as integers
    declare -i user_epoch_time;
    declare -i todays_epoch;

    #option to clear logs
    echo -n "Would you...
  15. Replies
    6
    Views
    370

    Re: bash variables line by lone from file

    Sounding like awk is the way to go, I was thinking I could just use read line, and then refer to the different variables much like in the command line arg syntax, $1, $2 etc, I'll get some code...
  16. Replies
    6
    Views
    370

    bash variables line by lone from file

    I have a number of records in a file, each contains 25 fields. I need 2 of these fields assigned to variables. Everything I've come up with thus far isn't working...

    my while read line; do just...
  17. Replies
    5
    Views
    375

    Re: Script to find scripts

    Not sure I followed.

    So for file in a directory set a variable equal to the whatever the file command returns, then compare this variable to "shell script" or something similar, if yes display,...
  18. Replies
    5
    Views
    375

    Re: Script to find scripts

    find -executable only looks for those marked +x

    file on the other hand will list if it is a shell script, guess the issue I'm having is the logic.

    If part of the file returns "shell script",...
  19. Replies
    5
    Views
    375

    Script to find scripts

    #!/bin/bash

    #scriptfinder.sh

    #check for arguments
    if [ ! -z $2 ]; then
    echo "USAGE: Too many arguments"

    #if argument is empty
    elif [ -z $1 ]; then
  20. Replies
    10
    Views
    2,902

    Re: touch and bash script

    As silly as this sounds I'm trying to put together a lesson plans for young kids i'm not sure they'll understand for loops and iterating thru a sequence >.<
  21. Replies
    10
    Views
    2,902

    Re: touch and bash script

    echo -e "*****************************************************"
    echo -e "** **"
    echo -e "** Now let's create some files in **"
    echo...
  22. Replies
    10
    Views
    2,902

    Re: touch and bash script

    That'll work but I'm trying to keep this as simple as possible.

    I need the shell to interpret the variable literally, if for example:
    $var = ~/dir1/file1

    I should be able to touch $var and get...
  23. Replies
    10
    Views
    2,902

    Re: touch and bash script

    read files_to_create

    touch $files_to_create

    I tried using grouping in the script but ended up with braces etc in the file names.
  24. Replies
    10
    Views
    2,902

    touch and bash script

    I'm trying to get a single var from a user and then create files based on that, very rudimentary but I can't seem to get it right.

    i.e.
    variable ~/make/this.txt ~/file/over/here.txt

    should...
  25. Replies
    5
    Views
    367

    Re: real silly sort problem

    Damn these old eyes ... thanks!
Results 1 to 25 of 146
Page 1 of 6 1 2 3 4