From: G Anna <drguruolai@eth.net>
To: Jim Reimer - WA5RRH <wa5rrh@arrl.net>
Cc: linux-newbie@vger.kernel.org
Subject: Re: trouble setting shell variable
Date: 26 May 2002 20:41:28 +0530 [thread overview]
Message-ID: <m3sn4f2bbz.fsf@wobble.eth.net> (raw)
In-Reply-To: <200205261406.g4QE6b9N012213@franklin.icok.net>
> Date: Sun, 26 May 2002 09:07:10 -0500
> From: Jim Reimer - WA5RRH <wa5rrh@arrl.net>
> Subj: trouble setting shell variable
>
> I'm trying to rename files based on what time it is *now*....
>
> echo `date` | cut -b 25-28,12-13,15-16,18-19
Why are you echoing? Simply pass the output of date to cut.
> gives me what I want to use for the file name, but I
> can't figure out how to get it into a variable for use
> later in the script when I rename the file. I've tried
>
> variablename=
$ b=`date | cut -b 25-28,12-13,15-16,18-19`
$ echo $b
2038422002
$
HTHs
anna
--
(14) The hero is not entitled to a last kiss, a last cigarette, or any
other form of last request. - Peter Anspach in "The Top 100 Things
I'd Do If I Ever Became An Evil Overlord"
http://www.eviloverlord.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
next prev parent reply other threads:[~2002-05-26 15:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-26 14:07 trouble setting shell variable Jim Reimer - WA5RRH
2002-05-26 15:11 ` G Anna [this message]
2002-05-26 15:58 ` Suriya Narayanan M S
2002-05-26 16:44 ` Jim Reimer - WA5RRH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3sn4f2bbz.fsf@wobble.eth.net \
--to=drguruolai@eth.net \
--cc=linux-newbie@vger.kernel.org \
--cc=wa5rrh@arrl.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox