09-04-2019
It may be not that simple, to reverse a script.
For example, if you have a file consisting of a and b characters. Your normal script replaces a with b. How do you reverse that? It's not possible to know original a's had been.
That maybe possible or impossible depending on the specific task. But there's hardly a generic way to do this.
If the task is about manipulating files you may take a backup before the task via cp, tar, rsync, ... and reset the state to that backup when needed.
What are you about to do? Why do want to reverse an action? What exactly do you want to reverse?
And of course: What's your OS environment and programming language/shell?
Last edited by stomp; 09-05-2019 at 03:09 AM..
9 More Discussions You Might Find Interesting
1. Windows & DOS: Issues & Discussions
I have been doing unix scripting for quite awhile and there seems to be a wealth of information on it.
Now I am working on migrating an intel based application to a new server.
I need to modify some existing scripts, but am having trouble finding information on windows scripting, a forum similar... (2 Replies)
Discussion started by: MizzGail
2 Replies
2. Shell Programming and Scripting
hi all,
I am a newbie in unix shell script. May I know how to write a bacth job to
read a list of files afrom the inout file and do the chmod ? Thanks.
i.e.
inside input.txt
====
a.txt
b.txt
c.txt
and I want to write a batch job to read the input .txt and do the chmod 755 for all 3... (14 Replies)
Discussion started by: kinmak
14 Replies
3. UNIX for Dummies Questions & Answers
Hi all,
We are running a batch job using Unix script. This batch job is running daily to get data from a Mainframe database and to load our tables. We are using an interactive ID for the batch job. If we removed that interactive ID, the batch job fails. What's my question is.. Is the... (1 Reply)
Discussion started by: pradeep.edara
1 Replies
4. Shell Programming and Scripting
Hi,
I have a shell script to find files older than 'X' days ($2) in directory path ($1) and delete them.
Like this:
my_file_remover.sh /usr/home/c 90
Now, I need to modify this script and add it in CRON, so that it checks other directories also.
Like:
my_file_remover.sh /usr/home/c... (3 Replies)
Discussion started by: guruparan18
3 Replies
5. Shell Programming and Scripting
Hi!
I'm a beginner at scripting, but have managed to complete a working KSH-script.. :D
But since this is going to production i a few weeks, I would like to optimize it and make it better structured!
The idéa of the script is to collect data from the database, put it in a file, and then... (2 Replies)
Discussion started by: linsto
2 Replies
6. AIX
Hi ,
I am trying to execute one script residing on server B from server A and in automated way but with a trigger.
My main quetion are
1) How I will login to the remote server automatically with user name and password. ( rsh or any other way ?)
2) Once logged in I need to execute... (2 Replies)
Discussion started by: agent47
2 Replies
7. UNIX for Dummies Questions & Answers
Hi
In unix how to create a batch job and Is there any command to close file in unix. Please help me I am new to unix world (6 Replies)
Discussion started by: vinay.h4
6 Replies
8. Solaris
Is it possible for a process id of 1. Is there anything special about 1 or 8 ? (7 Replies)
Discussion started by: Harleyrci
7 Replies
9. Windows & DOS: Issues & Discussions
Hi,
I am using a batch file to run 2 or more shutdown batch for each of my server like below:
Shutdown_serverA.bat
Shutdown_serverB.bat
...
Is there anyway i can do this in parallel instead of serially:confused:
ServerA & ServerB shutdown at the same time in one click (batch). (4 Replies)
Discussion started by: beginningDBA
4 Replies
LEARN ABOUT CENTOS
tapset::task
tapset::task(3stap) tapset::task(3stap)
NAME
tapset::task - systemtap task tapset
DESCRIPTION
task_current
The current task_struct of the current task
See function::task_current(3stap)
for details.
task_parent
The task_struct of the parent task
See function::task_parent(3stap)
for details.
task_state
The state of the task
See function::task_state(3stap)
for details.
task_execname
The name of the task
See function::task_execname(3stap)
for details.
task_pid
The process identifier of the task
See function::task_pid(3stap)
for details.
pid2task
The task_struct of the given process identifier
See function::pid2task(3stap)
for details.
pid2execname
The name of the given process identifier
See function::pid2execname(3stap)
for details.
task_tid
The thread identifier of the task
See function::task_tid(3stap)
for details.
task_gid
The group identifier of the task
See function::task_gid(3stap)
for details.
task_egid
The effective group identifier of the task
See function::task_egid(3stap)
for details.
task_uid
The user identifier of the task
See function::task_uid(3stap)
for details.
task_euid
The effective user identifier of the task
See function::task_euid(3stap)
for details.
task_prio
The priority value of the task
See function::task_prio(3stap)
for details.
task_nice
The nice value of the task
See function::task_nice(3stap)
for details.
task_cpu
The scheduled cpu of the task
See function::task_cpu(3stap)
for details.
task_open_file_handles
The number of open files of the task
See function::task_open_file_handles(3stap)
for details.
task_max_file_handles
The max number of open files for the task
See function::task_max_file_handles(3stap)
for details.
SEE ALSO
function::task_current(3stap), function::task_parent(3stap), function::task_state(3stap), function::task_execname(3stap),
function::task_pid(3stap), function::pid2task(3stap), function::pid2execname(3stap), function::task_tid(3stap),
function::task_gid(3stap), function::task_egid(3stap), function::task_uid(3stap), function::task_euid(3stap),
function::task_prio(3stap), function::task_nice(3stap), function::task_cpu(3stap), function::task_open_file_handles(3stap),
function::task_max_file_handles(3stap), stap(1), stapprobes(3stap)
IBM
--- tapset::task(3stap)