Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Can this be done with Scripts ??

  1. #11

    Re:Can this be done with Scripts ??

    [quote author=Compunuts link=board=9;threadid=5504;start=0#53145 date=1036479299]

    I moved about 10 mails and run the script. It replace all 10 mails with only one file, 1. It wiped the 9 mails that I needed to preserve.

    [/quote]

    Code:
    ash@nwsupplies:~/test$ ls
    11111111  22222222  33333333  44444444  55555555 534985789345 test.sh
    ash@nwsupplies:~/test$ sh test.sh
    ash@nwsupplies:~/test$ ls
    1  2  3  4  5  6 test.sh
    ash@nwsupplies:~/test$
    is the output it gives. I have absolutly no clue why it would replace mails with one file.

  2. #12
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    Re:Can this be done with Scripts ??

    [quote author=Ashcrow link=board=9;threadid=5504;start=0#53182 date=1036524802]
    I have absolutly no clue why it would replace mails with one file.
    [/quote]
    Here is my test.
    Code:
    [compunuts@dvdplayer test]$ ls
    [1036090007.1941.VQYn:2,S
    1036102905.1941.7y5S:2,S
    1036110705.1941.VrHm:2,S
    1036090008.1941.3pVR:2,S
    1036104405.1941.HBda:2,S
    1036111006.1941.3lVy:2,S
    1036090008.1941.Ch3p:2,S
    1036105606.1941.RMt6:2,S
    1036117912.1941.RHZl:2,S
    1036090008.1941.OwGj:2,S
    1036106505.1941.nTBV:2,S
    1036118207.1941.m2Xd:2,S
    1036094804.1941.LDS3:2,S
    1036107406.1941.xTKF:2,S
    1036119107.1941.eTnT:2,S
    [compunuts@dvdplayer test]$ sh test.sh
    [compunuts@dvdplayer test]$ ls
    1    test.sh
    So I also have no idea what went wrong... ???

  3. #13
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    Re:Can this be done with Scripts ??

    [quote author=GnuVince link=board=9;threadid=5504;start=0#53171 date=1036519233]
    You install Ruby, then do:
    Code:
    chmod +x script.rb
    ./script.rb my_dir_full_of_files
    [/quote]
    Here is the results ...

    Code:
    [compunuts@dvdplayer test]$ ls
    1036090007.1941.VQYn:2,S
    1036102905.1941.7y5S:2,S
    1036110705.1941.VrHm:2,S
    1036090008.1941.3pVR:2,S
    1036104405.1941.HBda:2,S
    1036111006.1941.3lVy:2,S
    1036090008.1941.Ch3p:2,S
    1036105606.1941.RMt6:2,S
    1036117912.1941.RHZl:2,S
    1036090008.1941.OwGj:2,S
    1036106505.1941.nTBV:2,S
    1036118207.1941.m2Xd:2,S
    1036094804.1941.LDS3:2,S
    1036107406.1941.xTKF:2,S
    1036119107.1941.eTnT:2,S
    script.rb
    test.sh
    [compunuts@dvdplayer test]$ ./script.rb /home/sysadmin/test/
    ./script.rb:12:in `rename': wrong argument type Fixnum (expected String) (TypeError)
    from ./script.rb:12
    from ./script.rb:11:in `foreach'
    from ./script.rb:11
    So now, what do I do??

    Please help ...

  4. #14
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935

    Re:Can this be done with Scripts ??

    [quote author=redhead link=board=9;threadid=5504;start=0#53155 date=1036485179]
    It will assure, the $TMPVAR is climbing, but if you reach MAX_LENGTH of assignment for the $TMPCNT it will start from 0 again.
    [/quote]
    Ah, your script seems to do what I wanted to do ...

    THANK YOU !! THANK YOU !!

    But I also likes to know what is the therotical MAX_LENGTH of your script?? If I ever got it working of what I wanted to do, I will work with you to summit the scripts to either KMail group or Sylpheed group which you will take credit for it.

    Thanks again.

  5. #15
    Moderator
    Advisor
    redhead's Avatar
    Join Date
    Jun 2001
    Location
    Copenhagen, Denmark
    Posts
    811

    Re:Can this be done with Scripts ??

    [quote author=Compunuts link=board=9;threadid=5504;start=0#53213 date=1036569200]But I also likes to know what is the therotical MAX_LENGTH of your script?? [/quote]
    I can't remember what it is, but is it the max length of a string you can assign to a variable in a bash script..

    Its gotta be mentioned in the man page somewhere..

Similar Threads

  1. Disable HTML Scripts with media files
    By regix in forum Windows - General Topics
    Replies: 1
    Last Post: 01-03-2005, 10:27 PM
  2. Any good site search scripts?
    By NGene in forum Programming
    Replies: 2
    Last Post: 08-28-2003, 11:46 AM
  3. Icons for personal scripts
    By doggiebone in forum Redhat / Fedora
    Replies: 5
    Last Post: 04-05-2003, 09:54 PM
  4. Scripts kiddies
    By Bogler in forum Linux - General Topics
    Replies: 12
    Last Post: 03-04-2002, 09:10 PM
  5. mp3 autoget scripts for linux irc clients?
    By linuxslacker in forum Linux - General Topics
    Replies: 0
    Last Post: 12-27-2001, 06:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •