Sponsored Content
Full Discussion: hi
Top Forums Shell Programming and Scripting hi Post 62895 by vgersh99 on Monday 21st of February 2005 10:29:38 AM
Old 02-21-2005
Quote:
Originally Posted by mkan
hi thanks locustfurnace

vgersh99 - sorry for asking this silly doubt

sed -e 's/[^;]//g' file |wc -c - this works fine no doubt,

but if i try

sed -e 's/;//g' file |wc -c - its not working why

i know ^ is used for excluding....what are u trying to do which makes it work
sed -e 's/[^;]//g' file
replace all the characters that are not ';' with null-strings/nothing. This effectively removes any non-';' character.

What is left?

What is left are ';'-s - and we count [wc -c] them .
 
hal-find(1M)						  System Administration Commands					      hal-find(1M)

NAME
hal-find, hal-find-by-capability, hal-find-by-property - search HAL global device list SYNOPSIS
hal-find-by-capability --capability capability [--help] [--verbose] [--version] hal-find-by-property --key key --string value [--help] [--verbose] [--version] DESCRIPTION
The hal-find commands, hal-find-by-capability and hal-find-by-property, search the Hardware Abstraction Layer (HAL) device list by speci- fied criteria and displays results on the standard output. hal-find-by-capability searches by capability, such as volume or block. hal- find-by-property searches by property, such as block.is_volume or volume.disc.has_audio. OPTIONS
The following options are supported: --capability capability HAL device capability to search for. --help Display list of options. --key key The key to the property that is the basis of the search. --string value The string value associated with the property that is the basis of the search. --verbose Verbose mode. --version Display version and exit. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWhalr | +-----------------------------+-----------------------------+ |Interface Stability |Volatile | +-----------------------------+-----------------------------+ SEE ALSO
hald(1M), attributes(5), hal(5) SunOS 5.11 22 Aug 2006 hal-find(1M)
All times are GMT -4. The time now is 07:19 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy