Sponsored Content
Full Discussion: Edit Multiple Files in VI
Top Forums UNIX for Dummies Questions & Answers Edit Multiple Files in VI Post 41436 by djschmitt on Monday 6th of October 2003 11:26:35 AM
Old 10-06-2003
Edit Multiple Files in VI

Here's what I have...

$ vi foo1
- open foo1 and work around for a while. I yank a few lines into a buffer and then :w to save.

Next I :e foo2 to open foo2 and paste my buffer. I :w to save, but I would like to then be able to go directly back into foo1 where I was before I opened foo2. Is that possible?
 

10 More Discussions You Might Find Interesting

1. AIX

Locking a file when using VI to prevent multiple-edit sessions by diff users

At the office, we often have to edit one file with VI. We are 4-6 workers doing it and sometimes can be done at the same time. We have found a problem and want to prevent it with a file lock. Is it possible and how ? problem : Worker-a starts edit VI session on File-A at 1PM Worker-b... (14 Replies)
Discussion started by: Browser_ice
14 Replies

2. Shell Programming and Scripting

How to edit file sections that cross multiple lines?

Hello, I'm wondering where I could go to learn how to edit file sections that cross multiple lines. I'm wanting to write scripts that will add Gnome menu entries for all users on a system for scripts I write, etc. I can search an replace simple examples with sed, but this seems more complex. ... (8 Replies)
Discussion started by: Narnie
8 Replies

3. Shell Programming and Scripting

Read and edit multiple files using a while loop

Hi all, I would like to simply read a file which lists a number of pathnames and files, then search and replace key strings using a few vi commands: :1,$s/search_str/replace_str/g<return> but I am not sure how to automate the <return> of these vis commands when I am putting this in a... (8 Replies)
Discussion started by: cyberfrog
8 Replies

4. UNIX for Dummies Questions & Answers

Using AWK: Extract data from multiple files and output to multiple new files

Hi, I'd like to process multiple files. For example: file1.txt file2.txt file3.txt Each file contains several lines of data. I want to extract a piece of data and output it to a new file. file1.txt ----> newfile1.txt file2.txt ----> newfile2.txt file3.txt ----> newfile3.txt Here is... (3 Replies)
Discussion started by: Liverpaul09
3 Replies

5. UNIX for Advanced & Expert Users

awk - remove block of text, multiple actions for 'if', inline edit

I'm having a couple of issues. I'm trying to edit a nagios config and remove a host definition if a certain "host_name" is found. My thought is I would find host definition block containing the host_name I'm looking for and output the line numbers for the first and last lines. Using set, I will... (9 Replies)
Discussion started by: mglenney
9 Replies

6. Shell Programming and Scripting

Need Help to Edit multiple column of a file

Hello Team, I want to know if there is any one liner command , using which I can edit multiple column of a file. input file input.txt (comma separated), taran, 12.45, uttam, 23.40, babay karan, 12.45, raju, 11.40, rahulg I want to update, 2nd and 4th column, but want all those column... (8 Replies)
Discussion started by: Uttam Maji
8 Replies

7. Shell Programming and Scripting

Help require to edit multiple files

I have 6 different pipe delimiter files. My loads failing due to missing company code. File1: 31 st field is company code. 402660076310|2014-12-10 17:22:39|2280361|MRYKI|1||CA|92507|US||1|1|0|0|0||N|A1|ONT|1001891771660009250700402660076310|WM|0201|RALA |2014-12-12|5|2014-12-12|5||FRI - 12... (4 Replies)
Discussion started by: srikanth38
4 Replies

8. Shell Programming and Scripting

Gunzip and edit many files

Experts - I have an requirement to gunzip and edit many files in a pair of directories. I have two scripts that work great when run separately, but I'm having problems combining the two. The goal is to gunzip the files found in the first script and pipe them to the bash/sed script and... (9 Replies)
Discussion started by: timj123
9 Replies

9. Shell Programming and Scripting

Edit and replace the multiple values in a file in one iteration

Hi All, I am preserving OLD and NEW values and want to replace the values in one go instead of using multiple sed and mv commands. Please help. echo "\nEnter the new qStart time '${CODE}' - (Hit Enter for No Change): \c" read NEW echo "\nEnter the new qStop time '${CODE}' - (Hit Enter for... (2 Replies)
Discussion started by: sdosanjh
2 Replies

10. Shell Programming and Scripting

Using sed to edit multiple files

Created a shell script to invoke sed to edit multiple files, but am missing something. Here's the shell script: oracle:$ cat edit_scripts.sh #!/bin/sh #------------------------------------------------------------------------------ # edit_scripts.sh # # This script executes sed to make global... (4 Replies)
Discussion started by: edstevens
4 Replies
MANDOS-CTL(8)							   Mandos Manual						     MANDOS-CTL(8)

NAME
mandos-ctl - Control the operation of the Mandos server SYNOPSIS
mandos-ctl [--enable | -e |--disable | -d] [--bump-timeout | -b] [--start-checker] [--stop-checker] [--remove | -r] [--checker COMMAND | -c COMMAND] [--timeout TIME | -t TIME] [--extended-timeout TIME] [--interval TIME | -i TIME] [--approve-by-default |--deny-by-default] [--approval-delay TIME] [--approval-duration TIME] [--interval TIME | -i TIME] [--host STRING | -H STRING] [--secret FILENAME | -s FILENAME] [--approve | -A |--deny | -D] {--all | -a | CLIENT...} mandos-ctl [--verbose | -v] [CLIENT...] mandos-ctl {--is-enabled | -V} CLIENT mandos-ctl {--help | -h} mandos-ctl {--version | -v} DESCRIPTION
mandos-ctl is a program to control the operation of the Mandos server mandos(8). This program can be used to change client settings, approve or deny client requests, and to remove clients from the server. PURPOSE
The purpose of this is to enable remote and unattended rebooting of client host computer with an encrypted root file system. See the section called "OVERVIEW" for details. OPTIONS
--help, -h Show a help message and exit --enable, -e Enable client(s). An enabled client will be eligble to receive its secret. --disable, -d Disable client(s). A disabled client will not be eligble to receive its secret, and no checkers will be started for it. --bump-timeout Bump the timeout of the specified client(s), just as if a checker had completed successfully for it/them. --start-checker Start a new checker now for the specified client(s). --stop-checker Stop any running checker for the specified client(s). --remove, -r Remove the specified client(s) from the server. --checker COMMAND, -c COMMAND Set the checker option of the specified client(s); see mandos-clients.conf(5). --timeout TIME, -t TIME Set the timeout option of the specified client(s); see mandos-clients.conf(5). --extended-timeout TIME Set the extended_timeout option of the specified client(s); see mandos-clients.conf(5). --interval TIME, -i TIME Set the interval option of the specified client(s); see mandos-clients.conf(5). --approve-by-default, --deny-by-default Set the approved_by_default option of the specified client(s) to True or False, respectively; see mandos-clients.conf(5). --approval-delay TIME Set the approval_delay option of the specified client(s); see mandos-clients.conf(5). --approval-duration TIME Set the approval_duration option of the specified client(s); see mandos-clients.conf(5). --host STRING, -H STRING Set the host option of the specified client(s); see mandos-clients.conf(5). --secret FILENAME, -s FILENAME Set the secfile option of the specified client(s); see mandos-clients.conf(5). --approve, -A Approve client(s) if currently waiting for approval. --deny, -D Deny client(s) if currently waiting for approval. --all, -a Make the client-modifying options modify all clients. --verbose, -v Show all client settings, not just a subset. --is-enabled, -V Check if a single client is enabled or not, and exit with a successful exit status only if the client is enabled. OVERVIEW
This is part of the Mandos system for allowing computers to have encrypted root file systems and at the same time be capable of remote and/or unattended reboots. The computers run a small client program in the initial RAM disk environment which will communicate with a server over a network. All network communication is encrypted using TLS. The clients are identified by the server using an OpenPGP key; each client has one unique to it. The server sends the clients an encrypted password. The encrypted password is decrypted by the clients using the same OpenPGP key, and the password is then used to unlock the root file system, whereupon the computers can continue booting normally. This program is a small utility to generate new OpenPGP keys for new Mandos clients, and to generate sections for inclusion in clients.conf on the server. EXIT STATUS
If the --is-enabled option is used, the exit status will be 0 only if the specified client is enabled. EXAMPLE
To list all clients: mandos-ctl To list all settings for the clients named "foo1.example.org" and "foo2.example.org": mandos-ctl --verbose foo1.example.org foo2.example.org To enable all clients: mandos-ctl --enable --all To change timeout and interval value for the clients named "foo1.example.org" and "foo2.example.org": mandos-ctl --timeout="5m" --interval="1m" foo1.example.org foo2.example.org To approve all clients currently waiting for it: mandos-ctl --approve --all SECURITY
This program must be permitted to access the Mandos server via the D-Bus interface. This normally requires the root user, but could be configured otherwise by reconfiguring the D-Bus server. SEE ALSO
intro(8mandos), mandos(8), mandos-clients.conf(5), mandos-monitor(8) COPYRIGHT
Copyright (C) 2010-2012 Teddy Hogeborn, Bjorn Pahlsson This manual page 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 manual page is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 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/. Mandos 1.5.5 2012-01-01 MANDOS-CTL(8)
All times are GMT -4. The time now is 04:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy