🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.tech.unix
Article #377

Re: help

#377
From: Richard Howlett
Date: Fri, 14 Apr 2000 00:00
30 lines
1443 bytes
Stuart Tomlinson wrote:
> 
> 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

man echo

Depending on your shell either:

1. -n between the echo and the argument to echo. Eg.
    echo -n "some words\t"
    echo "some more words"
The \t echos a tab character. You could substitute it for a space. The
double quotes are necessary.

2. \c as the last character of the line. Eg.
    echo "some words\t\c"
    echo "some more words"

My shell (Korn on SCO OpenServer) supports both but YMMV.

-- 
Richard Howlett

mailto:richard@howie.org.uk
Technical Details
Message-ID: <38F77631.9E4F9361@NOSPAM-howie.org.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: Richard Howlett <richard@NOSPAM-howie.org.uk>
Subject: Re: help
Date: 2000/04/14
Message-ID: <38F77631.9E4F9361@NOSPAM-howie.org.uk>
X-Deja-AN: 611255475
Content-Transfer-Encoding: 7bit
X-NNTP-Posting-Host: rhowlett.demon.co.uk:212.228.247.39
References: <K8sH4.767$5D.1658@ozemail.com.au> <n52nc8.i7s.ln@127.0.0.1> <8d7pfa$mpb$1@gxsn.com>
X-Accept-Language: en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@demon.net
X-Trace: news.demon.co.uk 955743600 nnrp-11:3767 NO-IDENT rhowlett.demon.co.uk:212.228.247.39
MIME-Version: 1.0
Newsgroups: demon.tech.unix