Unix Script Help - SED
#1
![Question](https://www.scoobynet.com/images/icons/icon5.gif)
I'm having a hole in the head morning!
I've got a file containing various words, for example,
APPLE
BANANA
PEAR
MANGO
I'm using this command to print everything that starts with A but it isn't working.
cat file ¦sed '/^A*/p'
The result is that it just prints the whole file. I've tried it without using the * but the same thing happens? What am I missing??
Cheers
Marc
I've got a file containing various words, for example,
APPLE
BANANA
PEAR
MANGO
I'm using this command to print everything that starts with A but it isn't working.
cat file ¦sed '/^A*/p'
The result is that it just prints the whole file. I've tried it without using the * but the same thing happens? What am I missing??
Cheers
Marc
Thread
Thread Starter
Forum
Replies
Last Post
Karlos
Computer & Technology Related
9
10 March 2002 03:23 PM