Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Run executable in one directory and then move to another successively Post 302794253 by Don Cragun on Monday 15th of April 2013 01:25:44 PM
Old 04-15-2013
I interpreted the requirements differently than Corona688. Corona688 assumed that you only have one level of subdirectory and that their is a different My.exe in each directory.

I assumed that there could be multiple levels of directory and that there is only one My.exe command and that it is on your search path ($PATH). If my assumptions are correct, you could try:
Code:
find "$(pwd)/Parent_Dir" -name In1.file | while IFS="" read -r path
do      cd "${path%/*}"
        My.exe In1.file In2.File In3.File
done

I find it strange that two of your three files in each directory has an F in In[23].File and one of your three files has an f in In1.file, but this script uses the names you supplied.

Last edited by Don Cragun; 04-15-2013 at 02:26 PM.. Reason: Added missing quotes
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Cannot run UNIX executable !

I have installed the Darwin Calendar Server on my Mac and got it working. To start the server I open a Finder window on my mac and click the UNIX executable called RUN. In order to start the server automatically on bootup I used LINGON to add a startup Daemon to call "RUN -d". When I reboot... (6 Replies)
Discussion started by: thylacine
6 Replies

2. Shell Programming and Scripting

run and make an executable file

as i said before i'm a beginner in shell programming and i have two questions: how to run an executable file in shell scripts like for example let's say the file called "prog.exe", what's the shell command to run this file? also how can i make the shell file an executable file (if it is... (5 Replies)
Discussion started by: _-_shadow_-_
5 Replies

3. Shell Programming and Scripting

Linux Script to move executable to quarantine

Please help! I am preparing a Linux Script to move windows executable files from samba directory to quarantine directory. For safety, will use "file" command to determine if its executable. Anyone can help? Below is my trial script, but it just move everything, including non-executable.. any wrong... (2 Replies)
Discussion started by: gavintam
2 Replies

4. Shell Programming and Scripting

Exit shell after setting executable to run?

Hi, I have an executable file that has a rather long and tedious process to complete. How would I launch the executable using the shell, and then exit the shell while leaving the executable to run in the background? (1 Reply)
Discussion started by: pcwiz
1 Replies

5. Shell Programming and Scripting

script run when executable is launched

I need to know how to have a BASH script run every time Firefox is launched, what is the simplest way to do this? (1 Reply)
Discussion started by: glev2005
1 Replies

6. UNIX for Dummies Questions & Answers

Can't run the archiver executable error message

I am using the xarchiver on a xfce environment. When compressing a directory using xarchiver which has both files and subdirectories, I encounter the following error: Can't run the archiver executable: Failed to execute child process "tar" (Argument list too long) Does anyone know exactly what... (0 Replies)
Discussion started by: figaro
0 Replies

7. Shell Programming and Scripting

[SHELL] Executable? Run it!

I would like to make a script that I can see if the file is executable. If it is executable then it needs to run. Otherwise, if it is not executable the file needs to be edited, and run agian. I hope you understand what i mean. :) Thanks for the netherlands (4 Replies)
Discussion started by: dennisbest85
4 Replies

8. Shell Programming and Scripting

List files with date, create directory, move to the created directory

Hi all, i have a folder, with tons of files containing as following, on /my/folder/jobs/ some_name_2016-01-17-22-38-58_some name_0_0.zip.done some_name_2016-01-17-22-40-30_some name_0_0.zip.done some_name_2016-01-17-22-48-50_some name_0_0.zip.done and these can be lots of similar files,... (6 Replies)
Discussion started by: charli1
6 Replies

9. Shell Programming and Scripting

Shell script cannot create directory and move the file to that directory

I have a script, which is checking if file exists and move it to another directory if then mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly ... (9 Replies)
Discussion started by: digioleg54
9 Replies
FS_GETFID(1)						       AFS Command Reference						      FS_GETFID(1)

NAME
fs_getfid - Display the fid for a given path in AFS SYNOPSIS
fs getfid [-path] path [-help] DESCRIPTION
The fs getfid command displays the FID for a given path in AFS. The FID is the internal identifier used by AFS encoding the volume name and the file within a volume. CAUTIONS
This command is not available on Windows prior to version 1.5.60. OPTIONS
-path path The path of the file (or directory). -literal Windows only: for a symlink or mount point, evaluates the specified object rather than the object it refers to. -help Prints the online help for this command. All other valid options are ignored. OUTPUT
The output contains the name of the file or directory, the FID, and the volume containing the FID. The Windows version also outputs the object type instead of using "File" to describe all objects. EXAMPLES
On Unix: % fs getfid . File . (536870918.1.1) contained in volume 536870918 % fs getfid /afs/example.com/foo File /afs/example.com/foo (536870918.20404.20997) contained in volume 536870918 On Windows: % fs.exe getfid \afsexample.eduuseroob \afsexample.orgusroblinktestsroken Directory \afsexample.eduuseroob (537235559.1.1) contained in cell example.edu fs: File '\afsexample.orgusroblinktestsroken' doesn't exist % fs.exe getfid \afsexample.eduuseroob \afsexample.orgusroblinktestsroken -literal Mountpoint \afsexample.eduuseroob (536873032.1162.16997) contained in cell example.edu Symlink \afsexample.orgusroblinktestsroken (536874416.27618.488969) contained in cell example.org PRIVILEGE REQUIRED
The issuer must be have read access in the directory containing the path to be resolved. COPYRIGHT
This document was written by Steven Jenkins, and is released under the IBM Public License Version 1.0. Jeffrey Altman made several suggestions and additions. OpenAFS 2012-03-26 FS_GETFID(1)
All times are GMT -4. The time now is 01:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy