Need more info on 'specific', but here are some examples:
The source file is a '.profile' in my home directory that reads as follows:
alias vi='vim'
if [ $MACHINE = "Linux" ]
then
. $HOME/.bash_profile
. $HOME/.bashrc
fi
if [ ! "$LOGIN" ]
then
export LOGIN=$LOGNAME
fi
If I wanted just to show the line(s) that start with 'alias' I could do:
grep '^alias' .profile
alias vi='vim'
If I want to print out the 4th line, I could do:
sed '1,3d
5,$d' .profile
if [ $MACHINE = "Linux" ]
Just two quick examples. There are tons of other ways to do the above two examples (of course! TIMTOWTDI)
---
Batavus