Find the answer to your Linux question:
Results 1 to 5 of 5
i have made a simple file find script .i am expecting the results using dialog box but its not working . i new to linux undertraining.please help me out to ...
  1. #1
    Just Joined!
    Join Date
    Jun 2007
    Posts
    7

    File Serch script Unable run using GUI .Please help

    i have made a simple file find script .i am expecting the results using dialog box but its not working . i new to linux undertraining.please help me out to make it work thru dialog
    This is the script find.sh its working and getting results.

    #!/bin/bash
    echo "Enter Your filename for search"
    read A
    find /home/hemant "$A" -iname '*.txt'
    echo $A

    But when i use dialog i dont know how to get output from the search. can anyone help me with this pls. i want the find and output thru gui .

    #!/bin/bash

    dialog --title "Find File" --inputbox "Enter the filename" 10 50
    echo "Enter Your filename for search"
    read A
    find /home/hemant "$A" -iname '*.txt'
    echo $A

  2. #2
    Linux Enthusiast
    Join Date
    Aug 2006
    Posts
    631
    Assuming you're searching for files that begin with the entered pattern with .txt extensions:

    Code:
    #!/bin/bash
    
    echo -n "Enter your filename for search: "
    read A
    
    find /home/hemant -iname $A*.txt
    Regards

  3. #3
    Just Joined!
    Join Date
    Jun 2007
    Posts
    7

    but i want it for gui dialog

    i want to add this script in daiallog box and i want output in dialog box

  4. #4
    drl
    drl is offline
    Linux Engineer drl's Avatar
    Join Date
    Apr 2006
    Location
    Saint Paul, MN, USA / CentOS, Debian, Solaris, SuSE
    Posts
    1,117
    Hi.

    One way would be to use:
    --textbox file height width
    A text box lets you display the contents of a text file in a
    dialog box.
    -- excerpt from man dialog
    Try it on something small first, then adapt your script ... cheers, drl
    Welcome - get the most out of the forum by reading forum basics and guidelines: click here.
    90% of questions can be answered by using man pages, Quick Search, Advanced Search, Google search, Wikipedia.
    We look forward to helping you with the challenge of the other 10%.
    ( Mn, 2.6.n, AMD-64 3000+, ASUS A8V Deluxe, 1 GB, SATA + IDE, Matrox G400 AGP )

  5. #5
    Just Joined!
    Join Date
    Jun 2007
    Posts
    7

    Thumbs up okie guys DONE

    it worked after making some changes and --textbox thanks guys .

Posting Permissions

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