🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.tech.unix
Article #376

Re: help

#376
From: 'Dungeon' Dave
Date: Fri, 14 Apr 2000 00:00
31 lines
1454 bytes
.. and it came to pass that Stuart Tomlinson
<stu@ttscomputers.co.uk> uttered forth:
>Ob the subject of shell scripts, I need to write 2 values (user input and
>time) to a file
>
>Got this working but I need them on the same line
>
>at mo echo ing result >> file
>and then time >> file

Try echoing a "continuation" character (\c) after the first echo, ie:

echo "This is a line of text at \c" >>file
date +%H:%M >>file

should give you :

This is a line of text at Sunday, 12th october

Alternatively, try embedding the actual time into the line itself, eg:

echo "This is a line of text at `date +%H:%M`" >>file

HTH!!
-- 
 
"Dungeon" Dave, in anti-harvest mode...

From: abuse@yahoo.com
From: abuse@btinternet.com
From: *@localhost
Technical Details
Message-ID: <O3a8EMATb394EwiH@ghastly.demon.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <K8sH4.767$5D.1658@ozemail.com.au> <n52nc8.i7s.ln@127.0.0.1> <8d7pfa$mpb$1@gxsn.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: fac57,a69137bb0b34a75d
X-Google-Attributes: gidfac57,public
From: 'Dungeon' Dave <Dungeon@SpamNot.Here>
Subject: Re: help
Date: 2000/04/14
Message-ID: <O3a8EMATb394EwiH@ghastly.demon.co.uk>
X-Deja-AN: 611245726
X-NNTP-Posting-Host: ghastly.demon.co.uk:193.237.153.154
References: <K8sH4.767$5D.1658@ozemail.com.au> <n52nc8.i7s.ln@127.0.0.1> <8d7pfa$mpb$1@gxsn.com>
X-Complaints-To: abuse@demon.net
X-Trace: news.demon.co.uk 955742005 nnrp-10:24816 NO-IDENT ghastly.demon.co.uk:193.237.153.154
Organization: Blank
MIME-Version: 1.0
Reply-To: 'Dungeon' Dave <Dungeon@Ghastly.Demon.Co.UK>
Newsgroups: demon.tech.unix