Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Reverse prior batch job (without simply rewriting the script) Post 303038502 by stomp on Wednesday 4th of September 2019 05:58:51 PM
Old 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

windows scripting for a batch job

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

read input file for batch job

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

Regarding interactive ID of batch job

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

A Batch job to delete files from various directories

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

Help rewriting my KSH-script...

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

Script to start a remote batch job on another server

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

How to create a batch job ?

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

Can a batch job truly have a PID of 1?

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

To run job in parallel in batch

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
TuDu(1) 							   User Manuals 							   TuDu(1)

NAME
TuDu - A command-line tool to manage TODO lists hierarchically. SYNOPSIS
tudu [-f tudu_file] [-c config_file] [-v[v]] [-h] DESCRIPTION
TuDu is a commandline tool to manage hierarchical TODO lists, so that you can organize everything you have to do in a simple and efficient way. It does not use any database backend, but plain XML files. Every TODO is composed by: Status Currently only two options: Pending and Done. Title A short sentence summarizing the task. Description text A longer text providing more details. (Optional) Priority The urgency of the task. (Optional) Category A short tag such as @home, @work, @inet. (Optional) Deadline The latest date the task should be done. (Optional) Scheduled date The planned date to do the task. (Optional) Subtasks Every task can have any number of subtasks. (Optional) Tasks can be ordered by any of those fields, and categories can be used to show only some certain kinds of tasks. Tudu also warns when a deadline is approaching, and shows the percentage of the task done so far. OPTIONS
-f tudu_file Load the given tudu file -c config-file Load specific config file -v Display the TuDu version number. -vv Display license and copyright information. -h Display help. INTERFACE
All the key bindings described here are the defaults in tudu. They can be changed in the config file. h Move the cursor one level out in the tree depth. l Move the cursor one level in in the tree depth. j Move the cursor to the next task. k Move the cursor to the previous task. J Move a task one position down. K Move a task one position up. m Mark a task as done. dd Delete a task. dt Remove the deadline of the task. df Remove the priority of the task. dS Remove the scheduled date of the task. p Paste the last deleted task under the current cursor line. P Paste the last deleted task over the current cursor line. V Paste the last deleted task as a subtask of the currently selected task. o Add new task. O Add a new task over the current cursor line. a Edit the title of the task. t Edit the deadline. f Set the priority of the task. C Add or modify the category of the task. e Edit the description text of the task. x Scroll the text window upwards. z Scroll the text window downwards. S Edit the scheduled date of the task. X Scroll the schedule window upwards. Z Scroll the schedule window downwards. c Collapse or expand the children of the current task. M Hide or show tasks marked as done. / Search for a pattern in tasks titles. n Search the next occurrence of last search. N Search the previous occurrence of the last searched tasks. / Search for a pattern in tasks titles. n Search the next occurrence of last search. N Search the previous occurrence of the last search. : Open the command input. See the COMMANDS section. bt Sort by title. bT Sort by title in reverse order. bd Sort by done. bD Sort by done in reverse order. bl Sort by deadline. bL Sort by deadline in reverse order. bp Sort by priority. bP Sort by priority in reverse order. bc Sort by category. bC Sort by category in reverse order. bu Sort by user-defined order. bU Sort by reversed user-defined order. bd Sort by done. bD Sort by done in reverse order. bl Sort by deadline. bL Sort by deadline in reverse order. bp Sort by priority. bP Sort by priority in reverse order. bc Sort by category. bC Sort by category in reverse order. bu Sort by user. bU Sort by user in reverse order. s Save all the changes. ? Display the help. q Quit tudu saving the last changes. Q Quit tudu without saving anything. COMMANDS
hide category1 category2 ... categoryN Hide one or more categories. show category1 category2 ... categoryN Display one or more categories. showall Display all the categories. showonly category1 category2 ... categoryN Hide all the categories except the ones given. help Display the man page. CONFIG
The config file have several sections which start by a name between brackets, like [ general ]. Other config files can be included with the option: @include = 'path' The options of each section are: general collapse = yes|no Collapse the tasks by default. hide_done = yes|no Whether to hide tasks marked as done. hide_percent = yes|no Whether to hide the percentage display on each task. visual_tree = yes|no Toggle graphical tree. It shows marks, like (+) at the left of the tasks. It is necessary in some shells that can not display bold characters. bold_parent = yes|no Hilight the parents with children with bold letters. loop_move = yes|no Whether to jump to the beginning (or end) when the end (or beginning) is reached. days_warn = number How many days before the task is due will the deadline sport a warning remark. us_dates = yes|no Use US date format (mm/dd/yyyy), by default it uses dd/mm/yyyy. old_sched = yes|no Whether display or not past scheduled tasks on the scheduler. In case of yes the scheduled tasks for days already past will be dis- played on warn color. sort_order = string Default order in which tasks will be shown. Tasks are ordered by the 1st letter in the string, then by the 2nd, and so on. The letters mean: t title T reverse title d done D reverse done l deadline L reverse deadline c category C reverse category e percentage done E reverse percentage done u user-defined order U reverse user-defined order editor = 'path_bin %s' keys This section defines any key binding on the program. See the example in the default config file. theme Window positions are described by rows; each row with the syntax: row = [height]([width|]window[, [width|]window, ...]) The height and width can be the number of characters or a percentage followed by %. The possible windows are: help, tree, info, blank, vpipe, hpipe text, and schedule. The windows help, vpipe and info don't need to have height, neither hpipe needs to have width, because is predefined as 1. TuDu will try to guess the non given information. Other options for the theme are: columns = colm1,...,colmN Columns in tree window. The possible columns are: title, priority, category and deadline. category_length = numChar Number of characters to be displayed of the category. color = color_text, color_background The default colors for the text and background. The colors can be defined as (r, g, b), where r, g and b are numbers from 0 to 1000, or with the words: black, red, green, yellow, blue, magenta, cyan, white, transparent. window = color_text, color_background For each window can be defined it's own colors. The colors of vpipe and hpipe are the same, and defined with the window name pipe. selected = color_text, color_background Color for the items under the cursor. warn = color_text, color_background Color for the warnings, like the mark of deadline soon or the color of the task scheduled on the past. FILES
~/.tudurc User configuration file. /etc/tudurc Global configuration file. ~/.tudu.xml User default tudu. NO WARRANTIES
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. SEE ALSO
TuDu Home Page: http://www.cauterized.net/~meskio/tudu/ AUTHOR
TuDu was written by Ruben Pollan Bella <meskio@sindominio.net>. This manual page was written by Ruben Pollan Bella and further improved by Enrique Matias Sanchez. Unix January 09, 2010 TuDu(1)
All times are GMT -4. The time now is 10:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy