HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Csh shell
Operating System - HP-UX
1830899
Members
1905
Online
110017
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2001 02:44 AM
04-23-2001 02:44 AM
Hello,
I'm trying to put the value of a command to a variable, but I don't know how to make it.
In Ksh shell I do: var=$(date), but at the csh shell: set var=$(date), it's wrong....
Could anyone help me???
I'm trying to put the value of a command to a variable, but I don't know how to make it.
In Ksh shell I do: var=$(date), but at the csh shell: set var=$(date), it's wrong....
Could anyone help me???
Users are not too bad ;-)
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2001 02:58 AM
04-23-2001 02:58 AM
Re: Csh shell
set
set name=word
set name[index]=word
set name=(wordlist)
The first form of set shows the value of all shell
variables. Variables whose value is other than a single
word print as a parenthesized word list. The second form
sets name to the null string. The third form sets name to
the single word. The fourth form sets the indexth component
of name to word; this component must already exist. The
final form sets name to the list of words in wordlist. In
all cases the value is command and file-name expanded.
These arguments can be repeated to set multiple values in a
single set command. Note, however, that variable expansion
happens for all arguments before any setting occurs
set name=word
set name[index]=word
set name=(wordlist)
The first form of set shows the value of all shell
variables. Variables whose value is other than a single
word print as a parenthesized word list. The second form
sets name to the null string. The third form sets name to
the single word. The fourth form sets the indexth component
of name to word; this component must already exist. The
final form sets name to the list of words in wordlist. In
all cases the value is command and file-name expanded.
These arguments can be repeated to set multiple values in a
single set command. Note, however, that variable expansion
happens for all arguments before any setting occurs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2001 03:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-23-2001 03:15 AM
04-23-2001 03:15 AM
Re: Csh shell
Hi,
it is pretty simple. You have to include the command in single backticks. Like in the following example. Note the different single quotes.
set datum = `date +'%Y-%m-%d %H:%M'`
Hope this helps. Stefan
it is pretty simple. You have to include the command in single backticks. Like in the following example. Note the different single quotes.
set datum = `date +'%Y-%m-%d %H:%M'`
Hope this helps. Stefan
No Mouse found. System halted. Press Mousebutton to continue.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP