Sponsored Content
Top Forums Shell Programming and Scripting Shell programming - running the exe file and printing the output.. ? Post 302389490 by xoops on Monday 25th of January 2010 05:30:59 AM
Old 01-25-2010
try this

if you are want your script not to execute itself, try
Code:
 
ls /logfile/lib | while read filename
do
if [ ! -f dwarf_output.ksh ]; then
echo "STARTING THE FILE" $filename >>dwarf_output.txt
echo "*************************************">>dwarf_output.txt
dwarfdump $filename | grep DW_AT_SUN_command_line >>dwarf_output.txt
echo "END OF FILE " $filename >>dwarf_output.txt
fi
done

or
Code:
 
ls /logfile/lib | while read filename
do
if [ ! -f $0 ]; then
echo "STARTING THE FILE" $filename >>dwarf_output.txt
echo "*************************************">>dwarf_output.txt
dwarfdump $filename | grep DW_AT_SUN_command_line >>dwarf_output.txt
echo "END OF FILE " $filename >>dwarf_output.txt
fi
done

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Running EXE files on UNIX

I'm trying to find out if a executible file created in visual basic will run in the CGI-BIN of a unix server. I see the C section but no mention of VB. Thanks Sean (1 Reply)
Discussion started by: seanstog
1 Replies

2. Programming

Running exe's from front end

Hi, I have created a tool which analyses and debugs cobol programs on Unix environment usin the C files. I now want to create a frontend for the tool in windows. For this i need to establish some kinda communication between the front the end and the back end. I know pipes in one way of... (0 Replies)
Discussion started by: Sinbad
0 Replies

3. Programming

running exe

how we can run the exe when the system starts. (2 Replies)
Discussion started by: phani_sree
2 Replies

4. Shell Programming and Scripting

output file of the shell script running through crontab is deleting automatical daily.

Dear Friends, I am working on IBM AIX. I have written one script and kept in the crontab as to run daily at 11:38 AM. and the output of the script to be appended to the file generated with the month name. but my file deleting daily and the new file is creating with the output of the shell... (2 Replies)
Discussion started by: innamuri.ravi
2 Replies

5. UNIX for Advanced & Expert Users

My command is still running but someone closed my shell, can I get my output still?

I ran an fs_usage (based off dtrace facility) but someone closed the window I think.. But I still see the process running # 15023 I tried fg 15023 but it told me no job control.. Is there anyway I can see my output? The scan has been running an hour and the output is valuable to me. (3 Replies)
Discussion started by: glev2005
3 Replies

6. Shell Programming and Scripting

send arguments to a .exe file from a shell script

Folks , can anyone post a sample showing a way to parse a variable containing a string to a .exe file . Thanks Venu (2 Replies)
Discussion started by: venu
2 Replies

7. Shell Programming and Scripting

Recursive file processing from a path and printing output in a file

Hi All, The script below read the path and searches for the directories/subdirectories and for the files. If files are found in the sub directories then read the content of the all files and put the content in csv(comma delimted) format and the call the write to xml function to write the std... (1 Reply)
Discussion started by: Optimus81
1 Replies

8. UNIX for Dummies Questions & Answers

Help with printing output format from a file

Hi, I need help in printing data in below format from file extensions with .dml, i have listed details below file name is test_temp.dml, location in /home/users/test01/test_temp.dml file content: sample_type= record decimal(",") test_type; date("DD-MM-YYYY")(",") test_date... (2 Replies)
Discussion started by: AAHinka
2 Replies

9. UNIX for Dummies Questions & Answers

Help with printing advance output format from a file

Hi, below 'awk' code was given for my thread 'Help with printing output format from a file ' earlier, however script is not resulting expected output with below file content. cat test_tes123.dml record string("\001") emp_num; /* CHAR(11) NOT NULL*/ date("YYYYMMDD")... (1 Reply)
Discussion started by: AAHinka
1 Replies

10. Shell Programming and Scripting

Printing Terminal Output to a Error File

I am having a bash script which is basically invoking a python program to validate the Source Query results against the target query results. I am placing all the queries in a .sql file. I want to write to a Error log file incase if the syntax is wrong or if the column is not present in the... (4 Replies)
Discussion started by: ronitreddy
4 Replies
FILEATIME(3)								 1							      FILEATIME(3)

fileatime - Gets last access time of file

SYNOPSIS
int fileatime (string $filename) DESCRIPTION
Gets the last access time of the given file. PARAMETERS
o $filename - Path to the file. RETURN VALUES
Returns the time the file was last accessed, or FALSE on failure. The time is returned as a Unix timestamp. EXAMPLES
Example #1 fileatime(3) example <?php // outputs e.g. somefile.txt was last accessed: December 29 2002 22:16:23. $filename = 'somefile.txt'; if (file_exists($filename)) { echo "$filename was last accessed: " . date("F d Y H:i:s.", fileatime($filename)); } ?> ERRORS
/EXCEPTIONS Upon failure, an E_WARNING is emitted. NOTES
Note The atime of a file is supposed to change whenever the data blocks of a file are being read. This can be costly performance-wise when an application regularly accesses a very large number of files or directories. Some Unix filesystems can be mounted with atime updates disabled to increase the performance of such applications; USENET news spools are a common example. On such filesystems this function will be useless. Note Note that time resolution may differ from one file system to another. Note The results of this function are cached. See clearstatcache(3) for more details. Tip As of PHP 5.0.0, this function can also be used with some URL wrappers. Refer to "Supported Protocols and Wrappers" to determine which wrappers support stat(3) family of functionality. SEE ALSO
filemtime(3), fileinode(3), date(3). PHP Documentation Group FILEATIME(3)
All times are GMT -4. The time now is 10:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy