07-24-2008
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How do I define a particular dir in front of PATH variable and then run some job and then at the end of job SET the PATH variable to original?
in a script, WILL something like this work:
ORIG_PATH=$PATH
export PATH=/dir1/dir2:$PATH
RUN SOME JOBS .....
unset PATH
EXPORT... (2 Replies)
Discussion started by: Hangman2
2 Replies
2. Shell Programming and Scripting
Started a thread in beginners but I thought someone from this forum may have an idea as well. Thanks!
EDITED BY REBORG (3 Replies)
Discussion started by: robotsbite
3 Replies
3. Shell Programming and Scripting
In shell how would I get the parent directory of a file. E.g. I feed this in:
/path/to/textfile.txt
And get just:
/path/to
Thanks (2 Replies)
Discussion started by: pcwiz
2 Replies
4. Windows & DOS: Issues & Discussions
Hi,
(Apologies, I'm sure I'm not the first person to raise this question but so far in my searches haven't found a good answer).
I would like to output a listing per line of filename (including full path) and 'last updated' timestamp. e.g:
Z:\dir1\file1.txt 01/02/2010 10:43... (5 Replies)
Discussion started by: GM_AIX
5 Replies
5. Shell Programming and Scripting
Hi everyone
i am very new to linux , working on bash shell.
I am trying to solve the given problem
1. Create a process and then create children using fork
2. Check the Status of the application for successful running.
3. Kill all the process(threads) except parent and first child... (2 Replies)
Discussion started by: vizz_k
2 Replies
6. Shell Programming and Scripting
How to list all Subdirectories and files with its full path in a parent directory? (1 Reply)
Discussion started by: johnveslin
1 Replies
7. Shell Programming and Scripting
lyang0@lyang0-OptiPlex-755:~$ ./test.sh
.
lyang0@lyang0-OptiPlex-755:~$ cat test.sh
#!/bin/bash
echo `dirname $0`
lyang0@lyang0-OptiPlex-755:~$ pwd
/home/lyang0
it doesn't get "/home/lyang0" and only when run /home/lyang0/test.sh it will get, but how can I do, then it can get the real... (8 Replies)
Discussion started by: yanglei_fage
8 Replies
8. Shell Programming and Scripting
Hi All,
Can you please provide some pointers to move files from Base path to multiple paths in efficient way.Folder Structure is already created.
/Path/AdminUser/User1/1111/Reports/aaa.txt to /Path/User1/1111/Reports/aaa.txt
/Path/AdminUser/User1/2222/Reports/bbb.txt to... (6 Replies)
Discussion started by: karthikgv417
6 Replies
9. UNIX for Beginners Questions & Answers
Hi All,
Just started learning unix and stuck into below issue.
Suppose i have folder structure as below.
Dir1/Dir2/Dir3/File1.msg
I am looking to rename the file name from File1.msg to File2.msg but from the parent Dir1
From Dir3 i can easily run the command like
mv File1.msg... (2 Replies)
Discussion started by: Gurjeet Singh
2 Replies
10. UNIX for Beginners Questions & Answers
Hi and good day,
This string lets me find the html files:
ls -R /Volumes/LC3/Sites/chu | grep "html"
But how to list the files with their parent dir 'attached' to them:
For example:
n/fofo.html
n/siso.html
m/…
/
Any assistance would be greatly appreciated!
With best regards,... (5 Replies)
Discussion started by: OmarKN
5 Replies
LEARN ABOUT SUSE
tk::choosedirectory
chooseDirectory(3) User Contributed Perl Documentation chooseDirectory(3)
NAME
chooseDirectory - pops up a dialog box for the user to select a directory.
SYNOPSIS
$widget->chooseDirectory( ?option value ...? );
DESCRIPTION
The method chooseDirectory is implemented as a perl wrapper on the core tk "command" tk_chooseDirectory, and $widget is passed as the
argument to the hidden -parent option.
The chooseDirectory method pops up a dialog box for the user to select a directory. The following option-value pairs are possible as
command line arguments:
-initialdir dirname
Specifies that the directories in directory should be displayed when the dialog pops up. If this parameter is not specified, then the
directories in the current working directory are displayed. If the parameter specifies a relative path, the return value will convert
the relative path to an absolute path. This option may not always work on the Macintosh. This is not a bug. Rather, the General
Controls control panel on the Mac allows the end user to override the application default directory.
-parent $widget
Makes $widget the logical parent of the dialog. The dialog is displayed on top of its parent window.
-title titleString
Specifies a string to display as the title of the dialog box. If this option is not specified, then a default title will be displayed.
-mustexist boolean
Specifies whether the user may specify non-existant directories. If this parameter is true, then the user may only select directories
that already exist. The default value is false.
CAVEATS
Perl does not have a concept of encoded filesystems yet. This means that operations on filenames like "opendir" and "open" still use byte
semantics. Tk however uses character semantics internally, which means that you can get filenames with the UTF-8 flag set in functions like
"chooseDirectory", "getOpenFile" and similar. It's the user's responsibility to determine the encoding of the underlying filesystem and
convert the result into bytes, e.g.
use Encode;
...
my $dir = $mw->chooseDirectory;
$dir = encode("windows-1252", $dir);
opendir DIR, $dir or die $!;
...
See also "When Unicode Does Not Happen" in perlunicode and "Unicode in Filenames" in perltodo.
SEE ALSO
Tk::getOpenFile, Tk::getOpenFile
KEYWORDS
directory selection dialog
perl v5.12.1 2007-11-08 chooseDirectory(3)