How do I substitute a word throughout a file? For example change all instances of the word John to Mark. This would be in vi for korn shell. (10 Replies)
well i have this file here:
<XML>
<pregate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<system_c>HPREGATE</system_c>
<trans_c>HSPG</trans_c>
<trans_dt>20060105161333</trans_dt>
<user_id_m></user_id_m>
<func_c>C</func_c>
</pregate>
</XML>
i want to... (2 Replies)
Hello experts,
I know line number of the word I want to replace. Can "sed" substitute word on a specific line?
As well, can sed substitute words inside a specific patten.
ex. <word>lalala</word> #replace anything between <word> and </word>
minifish (2 Replies)
Hi every body!
I would like to get only filename in the result of find command in Linux but I don't know howto. Tks so much for your helps. (5 Replies)
Hi all ,
i am having a table which contains start date and end date
for ex ..
startdate enddate
12/03/2011 12/04/2012
11/03/2011 20/05/2011
11/04/2011 28/07/2011
how to grep startdate = 12/03/2011
enddate = 28/07/2011
i need output :-
startdate:12/03/2012... (4 Replies)
I am trying to do what I thought should be a simple substitution, but I can't get it to work.
File:
Desire output:
I thought I'd start with a sed command to remove the part of the header line preceding the string "comp", then go on to remove the suffix of the target string (e.g. ":3-509(-)"),... (3 Replies)
Hi all,
OS is Solaros 10 Sparc
While doing Netbackup upgradation to 7.5 , the server was asked to reboot.
But then it came up in single user mode,
and after I typed format command it showed some disk error.
bash-3.00# format
Searching for disks...WARNING:... (2 Replies)
i need to substitute word on a specific line.
I was able to do it on command line like below but it is not working in vi.
command line like below:
sed -e '8s/table_name/schema.table_name/' file_name.
in vi table_name and schema are my positional parameters that i pass into the
script.
... (5 Replies)
Team,
I want to change below parameter in all the files in a directory,
Check for HOSTNAME=`hostname`
Change to HOSTNAME=localhost
And I tried below but, its not working ☹
find /tmp -type f -exec sed 's/"HOSTNAME\=\`hostname\`"/"HOSTNAME\=localhost/g'"
Help me if I am missing... (6 Replies)
HI
I am trying to use the following code in the shell script (using grep)
usage()
{
echo "Usage: ./$0 <file name> <interval> <pattern>"
}
METRICS_FILE=$1
INTERVAL=$2
PATTERN="$3"
..
if
then
PATTERN="grep Gx"
fi
COUNT=`cat ${METRICS_FILE} | "${PATTERN}" |egrep... (8 Replies)
Discussion started by: asifansari
8 Replies
LEARN ABOUT DEBIAN
amttool
amttool(1) General Commands Manual amttool(1)NAME
amttool - remotely control Intel AMT managed machines.
SYNOPSIS
amttool host [ command ] [ arg(s) ]
DESCRIPTION
amttool is a perl script which speaks SOAP to Intel AMT managed machines. It can query informations about the machine in question and also
send some commands for basic remote control.
host is the hostname or IP address of the machine amttool should control. command is an optional command.
You must set fill AMT_PASSWORD environment variable with the AMT password.
For more inforamtions on Intel AMT check amt-howto(7).
COMMANDS
info gather information (default).
reset [ special ]
reset machine, with optional special command (see section below).
powerup [ special ]
turn on machine.
powerdown
turn off machine.
powercycle [ special ]
powercycle machine.
netinfo
print network configuration (requires AMT 2.5+).
netconf if link [ ip mask gw [ dns1 [ dns2 ]]]
configure network interface (requires AMT 2.5+). if is the interface handle, link the link policy. If in doubt just feed in what
the netinfo command prints. ip is the IPv4 address, mask the netmask, gw the default gateway, dns1 and dns2 are the DNS Servers.
If no IP configuration is specified the tool tries to configure the machine in shared mac address mode with dhcp, otherwise in sepa-
rate mac address mode with static IP address. Default for dns1 is the gateway address, for dns2 it is 0.0.0.0.
SPECIAL COMMANDS
Special commands can optionally be specified for reset, powerup and powercycle. They change the default boot behavior of the machine.
bios Asks for the BIOS boot messages being redirected to serial-over-lan.
pxe Network boot via PXE.
hd Boot from local disk.
hdsafe Boot from local disk (safe mode).
cd Boot from CD/DVD.
diag Boot in diagnostics mode.
ENVIRONMENT
AMT_PASSWORD
AMT password.
AMT_DEBUG
Enable debug output.
SEE ALSO amtterm(1), gamt(1), amt-howto(7)AUTHOR
(c) 2007 Gerd Hoffmann <kraxel@redhat.com>
(c) 2007,08 Gerd Hoffmann amttool(1)