| UNIX - Sed By Example |
| UNIX / Linux - General UNIX |
| Wednesday, 24 September 2008 10:14 |
Find and Replacesed -i 's|arp|/sbin/arp|g' /etc/init.d/proxyarpFind and Deletesed -e '/^$/d' file.txt Remove Multiple wordsThis will remove word, word1, or word2 from the file input.txt sed 's/word\|word1\|word2//g' input.txt Change the first instance on each lineThis will substitute the 1 instance of the word dog for cat on each line. sed 's/dog/cat/1' newfile.txt Change caseThis will change all the text to uppercase. sed -e 's/.*/\U&/g' input.txt Changing multiple filesBelow will change all the files in /etc from word1 to word2. sed -i 's/word1/word2/g' /etc/* Additonal
Further one-liners can be found here |
Latest Articles
- F5 LTM VE 10.2.x - Interfaces not recognised
- Cisco ASA - Security Levels / NAT Control
- F5 LTM - OneConnect
- Django - CSRF verification failed. Request aborted.
- F5 LTM VE - Unable to attach to PCI device 02:01.00 for Interface 1.1
- F5 LTM - Connection Management
- Brocade ADX - FTP
- PKI - Chain of Trust
- Juniper SRX - Site to Site VPN using a Dynamic IP address
- F5 LTM - How do I perform software installations ?
- Juniper SRX - NAT
- Juniper SRX - How to configure a route based VPN
- Juniper SRX - Dynamic VPN
- Juniper SRX - How to configure a policy based VPN
- Brocade ADX - NAT
- Brocade ADX - CSW nested rules
- How do I upgrade a Juniper SRX Series gateway
- Cisco ASA - How do I capture ARP`s ?
- Juniper SRX - Configuring Source NAT with pool
- Running a packet capture on a Juniper SRX
Popular
- Proxy ARP – SPLAT
- Check Point Commands
- IPSO - Commands
- ASA 8.3 - How to configure NAT
- vSphere - Creating User and Group Permissions
- PEMU - Free Cisco PIX Firewall Emulator / Simulator
- Configuring Wireless Connectivity within Backtrack 4 r2
- Juniper Netscreen Commands
- Juniper Netscreen - NAT Explained
- How do I install snmpwalk / snmpget using Yum ?
- Netscreen - NSRP
- ESX Convertor - The session is not authenticated
- Troubleshooting a Netscreen Site 2 Site VPN
- ESX - ViClient Cannot connect to host
- Endpoint Connect Installation / Troubleshooting Guide
- Check Point - How to Reset SIC
- ESXi - Connecting to a named pipe
- Netscreen - Routing Basics / Virtual Routers / PBR
- Configuring Windows 2008 R2 as an NTP Server
- Check Point Logging Troubleshooting Guide


