Yes, i need to save the file content as well exit from current vi screen.
Quote:
But try to correct the workflow first and use other tools not editors in scripts in such way...
Can you show the code, perhaps a better way can be devised to make entire processing.
Considered the below sample codes did same as the real environment.
In real script i didn't have permission to change the file, so i am not able to change the workflow.
The script do lot of checks and finally create file by using vi command.
Currently the end user must type :wq! to save and exit the file, So the script move on next iteration.
I expected to find some solution to send keys to close that file and complete the script without manual intervention
Hi ,
I need to prepare a script which will check my database with specific to particluar table. If the row count exceeds a certain limit, i need to send a mail to a set of Recipients.
Being new to unix, please guide me to complete this task.
Advance thanks,
Sekar. (4 Replies)
Hi all,
I have programmed in VB before, and have recently moved on to Bash.
In VB there is a command:
SendKeys {F12} > "Show Help"
SendKeys {Y} > "Answer Yes"
Is there any way of doing this in Bash? (I need to send the Ctrl key into the script?)
Thanks in advance (3 Replies)
Hi I have written one shell script , using that i am able to connect to remote machine but i have to
#!/usr/bin/expect -f
set address
set username
set password
set OOLpath
set dbusername
set dbpasswd
set tnsname
set recdbusername
set recdbpasswd
set rectnsname
spawn ssh... (1 Reply)
Hi,
I have written one shell script , using that i am able to connect to remote machine but i have to
#!/usr/bin/expect -f
set address
set username
set password
set OOLpath
set dbusername
set dbpasswd
set tnsname
set recdbusername
set recdbpasswd
set rectnsname
spawn ssh... (2 Replies)
Hi All,
I am new to the unix , i have to deliver one script very urgently
I have to write a shell script where i have i want to send email to specific email id
in this script i want
FROM to be parameterized and stored in a variable
TO to be parameterized and stored in a variable... (3 Replies)
Hi all,
I needed a shell script for file transfering using public/private keys for authentication.
Could you please help me out on this?
A procedure to write a shell script is enough.
Thanks in advance.
Regards.
Vidya N (8 Replies)
Hi Guys,
I am very new to shell script and I need your help here to write a script. Actually, I have a script abc.sh which don't get terminated itself. So I need to design a script to run this script, save the output to a file, search for a given string in the output and if it exists send those... (11 Replies)
Discussion started by: Sambit Sahu
11 Replies
LEARN ABOUT DEBIAN
uruk-save
uruk-save(8) SYSTEM ADMINISTRATION uruk-save(8)
NAME
uruk-save - save uruk rc configuration in iptables-save-style format
SYNOPSIS
uruk-save [-6 (save ip6tables rules)]
OPTIONS
-6 (save ip6tables rules)
Don't save iptables rules but save ip6tables rules, for IPv6 filtering.
DESCRIPTION
uruk-save saves the IPv4 rules in /etc/uruk/rc in iptables-save(5)-style format, without invoking iptables(8). If the -6 option is given,
the IPv6 rules (if any) in /etc/uruk/rc are saved, in ip6tables-save(5)-style format. It prints output to stdout; suggested invocation
therefore is
# uruk-save > /var/lib/uruk/iptables/active
or
# uruk-save -6 > /var/lib/uruk/ip6tables/active
. This script is useful if you don't like the default behaviour of the uruk init script, and would like it to load the current uruk rc file
instead of the current active file. Please note: generally you don't need to invoke this script manually: the init script which comes with
uruk is suitable for most cases, it invokes uruk-save if needed.
WARNING
Just as uruk, in order to keep the uruk-save script small and simple, the script does very little error handling. It does not check the con-
tents of the rc file in any way before executing it. When your rc file contains bogus stuff, uruk-save will very likely behave in unexpected
ways. Caveat emptor.
Things will likely break if you do fancy stuff in an rc hook file. For instance, uruk-save saves the filter table only. If you define mangle
or nat tables, things will break.
If your rc file is in verbose mode (i.e. it features set -x) or in no-act mode (i.e. it features iptables='echo iptables'), uruk-save fails.
SEE ALSO
uruk(8), uruk-rc(5) .
COPYRIGHT
Copyright (C) 2005 Joost van Baal <joostvb-uruk@mdcc.cx>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABIL-
ITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.
AUTHOR
Joost van Baal <joostvb-uruk@mdcc.cx>
uruk-save 20120530 30 mai 2012 uruk-save(8)