Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Tidying up temp files on exit of script Post 27683 by Bab00shka on Thursday 5th of September 2002 06:45:21 AM
Old 09-05-2002
Question Tidying up temp files on exit of script

Hi

I believe there is a method to remove all temporary files when a KSH script terminates (either expectedly or unexpectedly).

I think is some sort of subroutine you can create that runs when the script exits. Can anyone help me with this please?

Many thanks
Helen Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to Delete temp files and check file system

Hi all, new to the threads as well as Unix/Linux. I need to create a script that will delete any temporary files as well as check the files on the system for errors or corruption. This is what I have so far and I'm sure that I'm missing things or have the wrong commands. I'm not sure where to go... (3 Replies)
Discussion started by: Bwood1377
3 Replies

2. UNIX for Dummies Questions & Answers

Security issue and temp files

Hello, One of the senior network admins at work told me that I should not hard code temp files into my scripts. Rather I should use the mktemp commands in the script to create them on the fly. His argument was that if a malicious user knew the name of my temp files in the script they could... (6 Replies)
Discussion started by: mojoman
6 Replies

3. Shell Programming and Scripting

temp files

Hi there, As a regular unix user I am forever programming on the command line or writing scripts so that I first write a load of data to a file to read from. In the end I am always left with a bundle of .txt, .tmp which is what I usually call them. As a basic programmmer I was wondering is... (6 Replies)
Discussion started by: cyberfrog
6 Replies

4. Shell Programming and Scripting

Script to temp create files more than inode limit

HI, I am from testing background. I have a scenario of a file generation, through cronjob, on a defined path. After I fill the data as 100 % utilized, my application is generating an empty file on the defined path. # df -kh Filesystem Size Used Avail Use% Mounted on... (3 Replies)
Discussion started by: atulbassi83
3 Replies

5. Shell Programming and Scripting

LINUX - How to compare the values in 2 files & exit from the script

Hi All, I have a requirement where I need to compare 2 files & if the values in the files match, it should proceed, else exit the script without proceeding further. For e.g : Scenario 1 In this case, the script should exit without proceeding further. Scenario 2 In this case, the script... (7 Replies)
Discussion started by: dsfreddie
7 Replies

6. OS X (Apple)

Safari Temp Internet Files Location

I'm looking for help with finding where plugin data and other page resources are stored on the hard disk in safari 6.0. With the new update, the activity window has been merged into the develop menu under "show page resources" and one cannot access them directly. I tried running opensnoop to see... (3 Replies)
Discussion started by: sakurashinken
3 Replies

7. Shell Programming and Scripting

Backup shell script created temp files .

Hi, I've a script which creates a temp flat file for storing all business dates received on a single day from diff control files sent by source system on that day. e.g on 12th april I receive txns for business day 8,9,10,11 april. I capture this business day and append to a flat file from... (1 Reply)
Discussion started by: manojg9
1 Replies

8. Shell Programming and Scripting

RMTF (ReMove Temp Files)

Heyas As some applications (sed,grep,vi, etc) create some tempfiles, i'd changed a script to this: (sadly i cant find the original post (code) anymore (which just removed 2 'diffrent kinds'), just similar ones - forgot that as i was new to all this) :) ~ $ cat $(which rmtf) #!/bin/sh #... (1 Reply)
Discussion started by: sea
1 Replies

9. Shell Programming and Scripting

How to avoid the "temp files" in my script?

Hi ! :) I noticed that I create often of temporary files to keep character strings or other and I wish to avoid that if possible ? e.g : #!/bin/bash CONFIG_FILE="conf.cfg" TEMP_HOSTNAME="temp_file1.txt" for IP in `egrep -o '({1,3}\.){3}{1,3}' $CONFIG_FILE` do ssh "$IP"... (2 Replies)
Discussion started by: Arnaudh78
2 Replies

10. Shell Programming and Scripting

Removing large number of temp files

Hi All, I am having a situation now to delete a huge number of temp files created during run times approx. 16700+ files. We have never imagined that we will get this this much big list of files during run time. It worked fine for lesser no of files in the list. But when list is huge we are... (7 Replies)
Discussion started by: mad man
7 Replies
X3270IF(1)						      General Commands Manual							X3270IF(1)

NAME
x3270if - command interface to x3270, c3270 and s3270 SYNOPSIS
x3270if [ -v ] action [ ( param [ ,... ] ) ] x3270if [ -v ] -s field x3270if -i DESCRIPTION
x3270if provides an interface between scripts and the 3270 emulators x3270, c3270, and s3270. x3270if performs one of three functions. In action mode (the default), it passes a single action and optional parameters to the emulator for execution; the result of the command is written to standard output. In status mode, it reports to standard output the value of one of the emulator's status fields. In iterative mode, it forms a continuous conduit between a script and the emulator. OPTIONS
-v Turns on verbose debug messages, showing the literal data that is passed between the emulator and x3270if. -s field Puts x3270if in status mode: it outputs the value of an emulator status field. Field is an integer in the range 0 through 11. The value 0 is a no-op and is used only to return exit status indicating the state of the emulator. The indices 1-11 and meanings of each field are documented on the x3270-script(1) manual page. -i Puts x3270if in iterative mode. Data from x3270if's standard input is copied to the emulator's script input; data from the emula- tor's script output is copied to x3270if's standard output. x3270if runs until it detects end-of-file on its standard input or on the output from the emulator. (This mode exists primarily to give expect(1) a process to run, on systems which do not support bidi- rectional pipes.) EXIT STATUS
In action mode, if the requested action succeeds, x3270if exits with status 0. If the action fails, x3270if exits with status 1. In iter- ative mode, x3270if exits with status 0 when it encounters end-of-file. If there is an operational error within x3270if itself, such as a command-line syntax error, missing environment variable, or an unexpectedly closed pipe, x3270if exits with status 2. ENVIRONMENT
x3270, c3270, and s3270 use a pair of pipes for communication with each child process. The values of the file descriptors for these pipes are encoded as text in two environment variables, which are required by x3270if: X3270OUTPUT Output from the emulator, input to the child process. X3270INPUT Input to the emulator, output from the child process. SEE ALSO
x3270(1), c3270(1), s3270(1), x3270-script(1) COPYRIGHT
Copyright 1999, 2000 by Paul Mattes. Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. 01 May 2002 X3270IF(1)
All times are GMT -4. The time now is 10:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy