The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: Where am I?
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 02-09-2009
quirkasaurus's Avatar
quirkasaurus quirkasaurus is offline
Registered User
  
 

Join Date: Jan 2009
Location: canton, michigan
Posts: 393
Quote:
Originally Posted by ruben.rodrigues View Post
Man, the idea is to not need to enter the directory. Is to write a script that tells me in which directory I am or in which file did I click

Oh. Try this, man.



Code:
#!/bin/sh
 
file=`zenity --list --title="Choose the FILE you wish to view" --column="File" *`
 
zenity --info --title="file, directory..." --text "directory: $PWD\nfile: $file"