I understand your point
but if I use my sed command in
then this would be asking confirmation for replacing text at some position or whole in a file...
I want to know how can I use SED command to replace each occurence only with confirmation from the user.
eg.
let this be some text in file
script should display
do you want to replace "apple" with "APPLE()" in line
apple boy cat dog (y/n)
say n
again
do you want to replace "apple" with "APPLE()" in line (for first occurrence)
boy dog apple apple cat (y/n)
say y
again
do you want to replace "apple" with "APPLE()" in line (for second occurrence)
boy dog APPLE() apple cat (y/n)
say n
and so on
Can this be achieved using SED or any other command ???
Last edited by pludi; 01-27-2010 at 05:25 AM..
Reason: code tags, please...
we had a power outage shortly after i registered...
so my mail server was down for a while...
could i get the email confirmation for hackware --> resent please...?
thanx...
...william.o.yates...email removed (3 Replies)
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Hi,
I was writing a simple web application using Perl -CGI. When users try to do some operations, I wanted like a pop-up confirmation box. Is this possible with Perl-CGI?
Thanks in advance.
Regards,
garric (6 Replies)
Hello,
I really would appreciate some help with a bash script for some string manipulation on an SQL dump:
I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump.
This is quite easy with sed:
sed -e... (1 Reply)
from one script invoke another script will need to do double confirmation like: 'y' and 'y'
exp:
echo 'y' | /a/b/c.sh
only input 1 'y' in the c.sh, but the c.sh required 2 'y' (twice confirmation)
is there anyway get resolve this issue?
please help (2 Replies)
Hi All,
While am deleting a file in unix by using the command rm it's deleting the file directly
IT's have to ask the user while deleting like
do you want to delete filename y or N ?
Kindly help on this.
Thanks
Thelak (2 Replies)
Dear All,
i want to search particular string and want to replance next line value.
following is the test file.
search string is
tmp,???
,10:1 "???" may contain any 3 character it should remain the same and next line replace with ,10:50
tmp,123 --- if match tmp,??? then... (3 Replies)
Hi all,
I am editing a config file in vi that has a / on it.
At the moment, search and replace looks alright as am able to use a # as a temporary separator, i.e. :,$s#/u01/app#/u02/app#g
For doing a search, I have to escape the / do. So if I want to search for /u01/app, I am having to do... (2 Replies)
Hi Team,
I am new to unix, please help me in this.
I have a file named properties.
The content of the file is :
##Mobile props
east.url=https://qa.east.corp.com/prop/end
west.url=https://qa.west.corp.com/prop/end
south.url=https://qa.south.corp.com/prop/end... (2 Replies)
Discussion started by: tolearn
2 Replies
LEARN ABOUT MOJAVE
gss
gss(5) BSD File Formats Manual gss(5)NAME
gss -- how to configure gss framework
DESCRIPTION
The gss GSS.frameworks have several configuration domains, all can configured with defaults(1).
Configuration can be stored both in the user's configuration ( ~/Library/Preferences) and system ( /Library/Preferences ).
CONFIGURATION OPTIONS
Use gsstool(1) to list the supported options and their settings:
gsstool supported-mech --options
Common options are:
NTLM 'Force NTLMv1'
Force client to use NTLMv1
NTLM NTLMv1
Enable support for NTLMv1 in both client and server
NTLM NTLMv2
Enable support for NTLMv2 in both client and server
NTLM 'NTLM session key'
Require backends to support for NTLMv2 session key, Lion and earlier dont support this. Session keys is required for NTLM MIC that
stops reflection attacks.
NTLM 'AllowedHosts'
What hosts that NTLM is allowed to be used for. When there a host that is not on the list, NTLM will not be used. File globbing is
used when matching and it's case insensitive. When there is no configuration, all hosts are allowed.
defaults write com.apple.GSS.NTLM AllowedHosts -array host.local '*.my.domain'
NTLM options
If you want to disable NTLM support completely in both the acceptor (server) and initiator (client), you need disable both NTLMv1 and NTLMv2,
and set their values to boolean false or 0.
defaults write com.apple.GSS.NTLM NTLMv1 -bool false
defaults write com.apple.GSS.NTLM NTLMv2 -bool false
APPLE MAC OS X
You can use the defaults write command to change the options, for simple boolean options, use this:
defaults write com.apple.GSS.NTLM NTLMv1 -bool false
You can also turn on debugging (output in syslog) using:
defaults write com.apple.GSS DebugLevel -int 10
open -a Console
SEE ALSO defaults(1), gss_mo(3), heimdal_debug(1)HEIMDAL Sep 1, 2010 HEIMDAL