Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19

Warning: Function ereg() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 4

Warning: Function split() is deprecated in ..../includes/class_postbit.php(345) : eval()'d code on line 19
quick tips
Results 1 to 8 of 8

Thread: quick tips

  1. #1

    quick tips

    Need some quick tips for a little script. I'm total dummy in shell scriptyng so don;t be afraid to treat me as such.
    I need to run a simple script that :
    1. Will run in terminal
    2. Will execute 'telnet <hostname> 259'
    3. User will be promted for credentials and after he has done so the terminal window should be closed.
    4. Thuis script should be launced by clicking on the icon placed on the user desktop in X
    A little help please.
    Thanks.

  2. #2

    Re:quick tips

    how about args?

    ./test.sh foo bar

    foo would be treated as the variable $1, and bar $2, and so on...

  3. #3
    Guest

    Re:quick tips

    lot's of tips available here and here

  4. #4

    Re:quick tips

    If that's not too much of imposition guys, can you drop a few lines for that script - I want to do some presenrtation for my boss as how linux can be used remotely from home for corporate users and the absense of this script is the only thing that stops me...
    If it's not too much to ask.....I would;n wanna to postpone it indefinetely untill I figure put myself what to do with scripting....

  5. #5

    Re:quick tips

    Code:
    #!/bin/bash
    telnet <hostname> 259
    I'm all for helping but you really need to give it a try for yourself first, then ask us for help, not do it for you.

  6. #6

    Re:quick tips

    Do you need the script to be in Bash ? If not, all linux systems come with perl (most atleast)

    so you can have this:

    Code:
    #!/usr/bin/perl -w
    use strict;
    my $hostname;
    chop($hostname=<STDIN>);
    print `telnet $hostname 259`;

  7. #7

    Re:quick tips

    why print?
    why not exec() or system()?

  8. #8

    Re:quick tips

    [quote author=gorn link=board=9;threadid=9600;start=0#msg87425 date=1091211444]
    Code:
    #!/bin/bash
    telnet <hostname> 259
    I'm all for helping but you really need to give it a try for yourself first, then ask us for help, not do it for you.

    [/quote]

    Gorn, that was initial thought and the script you offered was actually the first thing i tried...it just didn't work. After that I decided to cry for help as at this point my limited knowledge with shell scripting was really exhausted :-)

    I should have metioned that I've tried it though.

Similar Threads

  1. CLI Tips and Tricks
    By trickster in forum Linux - Software, Applications & Programming
    Replies: 15
    Last Post: 03-14-2011, 02:50 AM
  2. Fax Tips
    By regix in forum Windows - General Topics
    Replies: 0
    Last Post: 01-30-2005, 12:40 AM
  3. Google Tips
    By mojo jojo in forum General Chat
    Replies: 1
    Last Post: 12-12-2003, 03:46 PM
  4. Tips for New Linux Users
    By cloverm in forum General Chat
    Replies: 3
    Last Post: 05-27-2002, 11:57 AM

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
  •