The UNIX and Linux Forums
>
Top Forums
>
Shell Programming and Scripting
basic cat replace string
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Directory
Register
Forum Rules
FAQ
Contribute
Members List
Search
Today's Posts
Mark Forums Read
Thread
:
basic cat replace string
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
1
(
permalink
)
02-16-2007
prkfriryce
Registered User
Join Date: Nov 2006
Posts: 44
basic cat replace string
trying to exclude hostnames ending in "s" from a host file:
Code:
# cat hosts ssef ssefd ssefsfff ssefsfs # for x in `cat hosts`; do echo "${x/*s}" ;done ef efd fff #
How can I echo/or not echo only 'ssefsfs' ??
thanks
Remove advertisements
The UNIX and Linux Forums
!!
Forum Sponsor
prkfriryce
View Public Profile
Find all posts by prkfriryce