I try to use the pattern substitution operators as documented in the O'Reilley "Learning the Korn Shell" but it doesn't seem to work as advertised.
This works all right:
var='Regular expressions rules!'
$ echo ${var//e/#}
R#gular #xpr#ssions rul#s!
The docs says that using !(expr)... (5 Replies)
Hi,
I have file 1.txt with following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433
**
**
**
In file 2.txt I have the following entries as shown:
0152364|134444|10.20.30.40|015236433
0233654|122555|10.20.30.50|023365433... (4 Replies)
Hi all,
I'm looking for some help. I have a file (very long) that is organized like below:
>Cluster 0
0 283nt, >01_FRYJ6ZM12HMXZS... at +/99%
1 279nt, >01_FRYJ6ZM12HN12A... at +/99%
2 281nt, >01_FRYJ6ZM12HM4TS... at +/99%
3 283nt, >01_FRYJ6ZM12HM946... at +/99%
4 279nt,... (4 Replies)
All,
I have the following file:
--------------------------------------
#
# /etc/pam.d/common-password - password-related modules common to all services
#
# This file is included from other service-specific PAM config files,
# and should contain a list of modules that define the services... (2 Replies)
I figured this would be simple, but I am stuck.
Variable longpath="/dir1/dir2/dir3/filename.stuff.morestuff.garbage"
I want to end up with just "filename.extra.moreextra". So, I want to get rid of the path and .garbage
I want to do this with just ksh internals. So, no sed,grep,awk,expr,... (4 Replies)
Hi,
I am trying to get a result out of this but fails please help. Have two files /tmp/1 & /tmp/hosts.
/tmp/1
IP=123.456.789.01
WAS_HOSTNAME=abcdefgh.was.tb.dsdc
/tmp/hosts
123.456.789.01
I want this result in /tmp/hosts if hostname is already there dont want duplicate entry.
... (5 Replies)
'Hi
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
The sample file:
dept1: user1,user2,user3
dept2: user4,user5,user6
dept3: user7,user8,user9
I want to match by '/^dept2.*/' but don't want to have substring 'dept2:' in output. How to compose such regex? (8 Replies)
Hi all!
Thanks for taking the time to view this!
I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern.
Example:
Drink a soda
Eat a banana
Eat multiple bananas
Drink an apple juice
Eat an apple
Eat multiple apples
I... (8 Replies)
Hi
I need to do a patten match between files .
I am new to shell scripting and have come up with this so far. It take 50 seconds to process files of 2mb size . I need to tune this code as file size will be around 50mb and need to save time.
Main issue is that I need to search the pattern from... (2 Replies)
Discussion started by: nitin_daharwal
2 Replies
LEARN ABOUT CENTOS
backup_interactive
BACKUP_INTERACTIVE(8) AFS Command Reference BACKUP_INTERACTIVE(8)NAME
backup_interactive - Enters interactive mode
SYNOPSIS
backup [interactive] [-localauth] [-cell <cell name>]
[-help]
backup [i] [-l] [-c <cell name>] [-h]
DESCRIPTION
The backup interactive initiates an interactive session for issuing backup commands. As indicated in the syntax statement, the operation
code (interactive) is optional.
Several features of interactive mode distinguish it from regular mode:
o In interactive mode, the "backup"> prompt replaces the system (shell) prompt. The operator enters only a command's operation code
(omitting the command suite name, backup).
o If the -localauth flag or the -cell argument is included on the backup interactive command, the settings apply to all commands issued
during that interactive session. The issuer does not need to type them on every command. Another consequence is that the flag and
argument do not appear in the syntax statement generated by the help subcommand or -help flag on an individual command issued at the
"backup"> prompt.
o The backup jobs and backup kill commands are available only in interactive mode. It is not possible to track and terminate backup
operations as cleanly in non-interactive mode.
o It is not necessary to enclose strings that include metacharacters in double quotes or other delimiters.
o The backup command interpreter establishes a connection to the Backup Server, Volume Server and Volume Location (VL) Server processes
as it enters interactive mode, and uses the same connection for all commands during the session. Execution time can therefore be faster
than in non-interactive mode, in which the command interpreter must establish a new connection for each command.
To exit an interactive session, issue the backup quit command.
OPTIONS -localauth
Constructs a server ticket using a key from the local /etc/openafs/server/KeyFile file. The backup command interpreter presents it to
the Backup Server, Volume Server and VL Server during mutual authentication. Do not combine this flag with the -cell argument. For more
details, see backup(8).
-cell <cell name>
Names the cell in which to run the command. Do not combine this argument with the -localauth flag. For more details, see backup(8).
-help
Prints the online help for this command. All other valid options are ignored.
EXAMPLES
The following example shows how the -localauth flag and -cell argument do not appear when the help dump subcommand is issued in interactive
mode.
% backup
backup> help dump
dump: start dump
Usage: dump [-volumeset <volume set name>] [-dump <dump level name>]
[-portoffset <TC port offset>] [-at <Date/time to start dump>+]
[-append ] [-n ] [-file <load file>] [-help ]
PRIVILEGE REQUIRED
None. However, backup commands that require privilege in regular mode still require it in interactive mode.
SEE ALSO backup(8), backup_jobs(8), backup_kill(8), backup_quit(8), butc(8)COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas
Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
OpenAFS 2012-03-26 BACKUP_INTERACTIVE(8)