Sponsored Content
Top Forums Shell Programming and Scripting sed to exact matching a word in free BSD Post 302581730 by ramanaraoeee on Wednesday 14th of December 2011 01:11:14 AM
Old 12-14-2011
sed to exact matching a word in free BSD

Hi,
Thanks for looking at this issue.
I have many words/lines in a files like below
Code:
apple
pine apple
custored apple apple
apple

if i want to replace only/exact apple occurrences with XXX i could use below,
Code:
sed 's/\<apple\>/XXX/g' filename

this is working in Linux, but now in my free BSD
i think this won't work in solaris also.

Could somebody provide me an alrenative.


Thanks,
ramana

Moderator's Comments:
Mod Comment How to use code tags

Last edited by Franklin52; 12-14-2011 at 03:31 AM.. Reason: Please use code tags for code and data samples, thank you
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Free Bsd

i am installing FREEBSD and I would like to know which hardware specific network card that works and help with this would be great I am very new to this (UNIX) (1 Reply)
Discussion started by: BSD_NEWUSER
1 Replies

2. BSD

X-Windows Free BSD

so, i have a video card SIS s315 AGP and i can't cofigure X Free on free BSD to run X window. Anybody can help me solve this problem?? (2 Replies)
Discussion started by: Dmitri-br
2 Replies

3. BSD

Free BSD X window

Can anyone help me ? I have installed Free BSD several times and I can't get the X window to work . I have installed the ports Gnome and others but for some reason when I type start x doesn't work. I downloaded the 3 i386 disks but I get to install the first one wich complete the setup and... (3 Replies)
Discussion started by: skyhawkfly
3 Replies

4. UNIX for Dummies Questions & Answers

Hardware for UNIX/Free BSD

Hi! I'm planning to start to set up a Webserver. All software has to be freeware. I'm also planning to use Free BSD/UNIX for this project. Apache as Webserversystem and so on... Therefor I would like to have some info about what kind of hardware I need. I'm planning to buy a computer... (9 Replies)
Discussion started by: kargooliw
9 Replies

5. BSD

installing free BSD

Hello friends. I am new to Unix although i am very flexible to any programming language. i was a window user. Now, no more. I have decided myself to switch to unix. Here is my problem: I burned the free BSD into my new RW CD's. I inserted the bootable manager first then, it was scanning and... (5 Replies)
Discussion started by: bonjour2006
5 Replies

6. Shell Programming and Scripting

sed - replacing on the right of a pattern and looking for exact word?

how would you get SED to do the following, say you have the following lines in a text file: user=tigger some text some text some text some text some text some text user=ted some text some text some text some text some text some text user=thekingofrockandroll you want to find any line... (15 Replies)
Discussion started by: rich@ardz
15 Replies

7. UNIX for Dummies Questions & Answers

Find EXACT word in files, just the word: no prefix, no suffix, no 'similar', just the word

I have a file that has the words I want to find in other files (but lets say I just want to find my words in a single file). Those words are IDs, so if my word is ZZZ4, outputs like aaZZZ4, ZZZ4bb, aaZZZ4bb, ZZ4, ZZZ, ZyZ4, ZZZ4.8 (or anything like that) WON'T BE USEFUL. I need the whole word... (6 Replies)
Discussion started by: chicchan
6 Replies

8. Shell Programming and Scripting

QUESTION1: grep only exact string. QUESTION2: find and replace only exact value with sed

QUESTION1: How do you grep only an exact string. I am using Solaris10 and do not have any GNU products installed. Contents of car.txt CAR1_KEY0 CAR1_KEY1 CAR2_KEY0 CAR2_KEY1 CAR1_KEY10 CURRENT COMMAND LINE: WHERE VARIABLE CAR_NUMBER=1 AND KEY_NUMBER=1 grep... (1 Reply)
Discussion started by: thibodc
1 Replies

9. BSD

USB mount of Free BSD

Hello all When I insert my USB , its says : umass0 detected . I want to ls files present in the USB. I tried mount -t msdosfs /dev/da0s1 /mnt Whats is dev/da0s1 ????? How can I mount it to use it ? Regards (3 Replies)
Discussion started by: Junaid Subhani
3 Replies

10. Shell Programming and Scripting

sed - Exact pattern matching and replace

Hi Team, I am facing a problem as under, Suppose I have a file (test.txt) with the below content (all braces and slashes are included in the contents of the file) Now I want to append few words below matched line, I have written the below sed: sed '/option/a insert text here' test... (2 Replies)
Discussion started by: ankur328
2 Replies
SmartCardServices-legacy(7)			       BSD Miscellaneous Information Manual			       SmartCardServices-legacy(7)

NAME
SmartCardServices-legacy -- overview of legacy SmartCard support DESCRIPTION
SmartCardServices-legacy is a set of components which add native support for SmartCards to OS X based on Tokend modules. Since OS X 10.12, there is SmartCard support which is described in SmartCardServices(7) Supported SmartCards appear as separate keychains. A Tokend module for each SmartCard you wish to use must be installed in /Library/Security/tokend USB SMART CARD READER DRIVERS
OS X has built-in support for USB CCID class-compliant SmartCard readers. For other readers, install the reader driver in /usr/local/libexec/SmartCardServices/drivers. Each driver is a bundle. The bundle contains an XML file Info.plist which contains the device's USB vendor ID and product ID. For detailed description of the plist format and how to write a reader driver, see http://pcsclite.alioth.debian.org/api/group__IFDHandler.html SMART CARD APDU LOGGING
It is possible to turn on logging for SmartCards by setting the global preference: sudo defaults write /Library/Preferences/com.apple.security.smartcard Logging -bool yes After a SmartCard reader is connected (or after reboot) all operations including contents of sent and received APDU messages are then logged into the system log. Logging uses the facility com.apple.security.smartcard.log so it is possible to set up filtering of these logs into custom targets (see asl.conf(5)) To avoid security risks that could occur if logging is turned on indefinitely, the logging setting is one-shot - it must be turned on by the command above to start logging again with a new reader. This includes unplugging and replugging the same reader. DISABLING NEW SMART CARD SUPPORT
It is possible to turn of the new tokens by setting the global preference: sudo defaults write /Library/Preferences/com.apple.security.smartcard DisabledTokens -array com.apple.CryptoTokenKit.pivtoken DISABLING SHEET AUTHORIZATION IN PREFERENCES
When using tokend-based SmartCards, according to your configuration you may not be able to use SmartCards for authorization in System Prefer- ences sheets. In such case, you can disable sheets using following command: defaults write com.apple.Preferences UseSheets -bool FALSE System Preferences will then use the original dialog-based authorization. ENTITLEMENT
Sandboxed PCSC clients require 'com.apple.security.smartcard=YES' entitlement. Non-sandboxed PCSC clients do not require such entitlement (in order to keep backward compatibility with macOS < 10.10). SEE ALSO
SmartCardServices(7), sc_auth(8), defaults(1), asl.conf(5), ssh-keychain(8) Mac OS X August 5, 2014 Mac OS X
All times are GMT -4. The time now is 09:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy