Sponsored Content
Top Forums Shell Programming and Scripting Sed - substitution for whole string Post 77701 by Scarlos on Tuesday 12th of July 2005 07:56:54 AM
Old 07-12-2005
Thanks, it works just fine =D
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sed String Substitution

Hi! I've the following script code with an input parameter: sed 's/oldstring/$1/g' myfile > newfile (I launch it with comman line: $ MyShell newstring) Problem: the substituion doesn't work (oldstring becomes $1, instead of newstring). How could I solve this situation? Thanks, ... (2 Replies)
Discussion started by: pciatto
2 Replies

2. Shell Programming and Scripting

String Substitution Question

When I run the script I pass in 2 expressions (ex. replace.ksh new old) I want the script to go line by line for a given file in a given directory and replace the word new with old. Of course in my line where I have the awk statement it is replacing the 2nd word with 1st instead of new with... (3 Replies)
Discussion started by: goodrics
3 Replies

3. UNIX for Advanced & Expert Users

String Substitution

Hey ppl, Could u tell me how to replace such a string xyz->x with XYZ(x), where x can be any variable accessible by pointer to structure, xyz in an entire file? (1 Reply)
Discussion started by: laxmi
1 Replies

4. Shell Programming and Scripting

string substitution

Hey ppl, Could u tell me how to replace such a string xyz->x with XYZ(x), where x can be any variable accessible by pointer to structure, xyz in an entire file? (3 Replies)
Discussion started by: laxmi
3 Replies

5. Shell Programming and Scripting

String substitution

Hi, I have a properties file (myprop.properties) which contains some values: @oneValue@==tcp://localhost:1234 @twoValue@==tcp://localhost:4563 @threeValue@==tcp://localhost7895 I have a xml file (myXmlFile.xml)which contains some tokens: <application name="aTest"> <NameValuePair> ... (3 Replies)
Discussion started by: ctrl-alt-del
3 Replies

6. Shell Programming and Scripting

Problem with sed string substitution

Hi, heres my problem: echo "aaaa(aaaa(aaa" | sed 's/a.*(//g' gives aaa but it should give aaaa(aaa .*( should find any string to the appearance of (, but it finds any string to the last appearance, any idea why, and how to do this? and what if the string ist... (2 Replies)
Discussion started by: funksen
2 Replies

7. Shell Programming and Scripting

substitution of string in brackets

Hi friends! I have a tab delimited file with two columns : GB_45_DRB SP:0139466(mrmi sisignm)|SP:3674(fllflg_itoioh)|SP:68954779(RMTKLGF to emmdm-roomto) GB_45_DRD SP:475928(mgmdksi rikgkg)|SP:587959(roykgl tiic-tm)|SP:0139466(mrmi sisignm)|SP:3674(fllflg_itoioh)|SP:68954779(RMTKLGF to... (4 Replies)
Discussion started by: jacks
4 Replies

8. Shell Programming and Scripting

a specific string substitution

hi guys...need some help here... i am making a a script to automatically install netbackup client...so its gonna write a configuration file according to the host name.... the line would be something like this CLIENT_NAME = odel_bkp.test.com the thing is ...the host name in reallity is... (2 Replies)
Discussion started by: razael
2 Replies

9. Shell Programming and Scripting

string substitution in perl

Hi, I have a template file and want to replace 3 parameters to the values that I want. these values are in a parameter file. Any idea how to do this in perl? the parameter file looks like: host_name = jupiter PORT = 1562 IPADDRESS = 10.1.34.10 the template file has lots of entry.... (1 Reply)
Discussion started by: melanie_pfefer
1 Replies

10. Shell Programming and Scripting

sed - String substitution within specified section in ini type file

Hello. I am trying to modify a config file which is in windows *.ini type file. I have found a piece of code here :linux - Edit file in unix using SED - Stack Overflow As I can't make it doing the job , I am trying to find a solution step by step. here a modified sample file : my_sample.ini... (1 Reply)
Discussion started by: jcdole
1 Replies
amt-howto(7)						 Miscellaneous Information Manual					      amt-howto(7)

NAME
amt-howto - Intel AMT with linux mini howto DESCRIPTION
What is AMT and why I should care? AMT stands for "Active Management Technology". It provides some remote management facilities. They are handled by the hardware and firmware, thus they work independant from the operation system. Means: It works before Linux bootet up to the point where it activated the network interface. It works even when your most recent test kernel deadlocked the machine. Which makes it quite useful for development machines ... Intel AMT is part of the vPro Platform. Recent intel-chipset based business machines should have it. My fairly new Intel SDV machine has it too. Documentation Look here for documentation beyond this mini howto: http://www.intel.com/technology/platform-technology/intel-amt/ Most useful to get started: "Intel AMT Deployment and Reference Guide" Very short AMT enabling instructions. Enter BIOS Setup. * Enable AMT Enter ME (Management Extention) Setup. Ctrl-P hotkey works for me. * Login, factory default password is "admin". * Change password. Trivial ones don't work, must include upper- and lowercase letters, digits, special characters. * Enable AMT Managment. Reboot, Enter ME Setup again with AMT enabled. * Configure AMT (hostname, network config, ...) * Use SMB (Small Business) management mode. The other one (Enterprise) requires Active Directory Service Infrastructure, you don't want that, at least not for your first steps ... Testing AMT Take your browser, point it to http://machine:16992/. If you configured AMT to use DHCP (which is the default) the OS and the management stack share the same IP address. You must do that from a remote host as the NIC intercepts network packets for AMT, thus it doesn't work from the local machine as the pack- ets never pass the NIC then. If everything is fine you'll see a greeting page with a button for login. You can login now, using "admin" as username and the password configured during setup. You'll see some pages with informations about the machine. You can also change AMT settings here. Control Machine You might have noticed already while browing the pages: There is a "Remote Control" page. You can remotely reset and powercycle the machine there, thus recover the machine after booting a b0rken kernel, without having someone walk over to the machine and hit the reset button. Serial-over-LAN (SOL) console AMT also provides a virtual serial port which can be accessed via network. That gives you a serial console without a serial cable to another machine. If you have activated AMT and SOL the linux kernel should see an additional serial port, like this on my machine: [root@xeni ~]# dmesg | grep ttyS2 0000:00:03.3: ttyS2 at I/O 0xe000 (irq = 169) is a 16550A Edit initab, add a line like this: T2:2345:respawn:/sbin/getty ttyS2 115200 vt100-nav You should add the serial port to /etc/securetty too so you are able to login as root. Reload inittab ("init q"). Use amtterm to connect. Tap enter. You should see a login prompt now and be able to login. You can also use that device as console for the linux kernel, using the usual "console=ttyS2,115200" kernel command line argument, so you see the boot messages (and kernel Oopses, if any). You can tell grub to use that serial device, so you can pick a working kernel for the next boot. Usual commands from the grub manual, except that you need "--port=0xe000" instead of "--unit=0" due to the non-standard I/O port for the serial line (my machine, yours might use another port, check linux kernel boot messages). The magic command for the Xen kernel is "com1=115200,8n1,0xe000,0" (again, you might have to replace the I/O port). The final '0' disables the IRQ, otherwise the Xen kernel hangs at boot after enabling interrupts. Fun with Xen and AMT The AMT network stack seems to become slightly confused when running on a Xen host in DHCP mode. Everything works fine as long as only Dom0 runs. But if one starts a guest OS (with bridged networking) AMT suddenly changes the IP address to the one the guest aquired via DHCP. It is probably a good idea to assign a separate static IP address to AMT then. I didn't manage to switch my machine from DHCP to static IP yet though, the BIOS refuses to accept the settings. The error message doesn't indicate why. More fun with AMT You might want to download the DTK (Developer Toolkit, source code is available too) and play with it. The .exe is a self-extracting rar archive and can be unpacked on linux using the unrar utility. The Switchbox comes with a linux binary (additionally to the Windows stuff). The GUI tools are written in C#. Trying to make them fly with mono didn't work for me though (mono version 1.2.3 as shipped with Fedora 7). SEE ALSO
amtterm(1), gamt(1), amttool(1) http://www.intel.com/technology/platform-technology/intel-amt/ WRITTEN BY
Gerd Hoffmann <kraxel@redhat.com> (c) 2007 Gerd Hoffmann amt-howto(7)
All times are GMT -4. The time now is 02:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy