[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: vi within a shel script
this will work... prolly a better way ;)
EXISTING=`cat ~/subscriber`
NEWLINE="$EXISTING $1"
echo $NEWLINE > ~/subscriber
make sure subscriber is there (touch subscriber)....
------------------------------------------------------------------
Steve Horrighs Jr., MCP 217-535-1010 VOICE
President, CTO 217-535-1009 FAX
CityScape Communications 217-622-2580 PAGER
447 North Walnut steve@cityscape.net
Springfield, IL 62702 http://www.cityscape.net
----------------------------------------------------------------
Service Bureau * Internet Consulting/Access * Sales * Networking
------------------------------------------------------------------
On Mon, 30 Nov 1998 charles@lunargraphics.net wrote:
> set UserName = $<
> vi ./subscribers
> A $UserName
> :! :wq
>
> how would one take input from a variable and append it to the end of a
> line within a text file? I tried the above, and needless to say, it doesnt
> work. the one hitch is that is must append the text to the end of one
> contiguous line with no carriage returns. any suggestions?
>
--
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.