Sponsored Content
Top Forums Shell Programming and Scripting Portable Shell Script - Determine Which Version of Binary is Installed? Post 302710811 by balajesuri on Friday 5th of October 2012 02:19:39 AM
Old 10-05-2012
An alternative to find the date 14 days in future, without checking which variant of date is installed on system, is to insert this perl one-liner in your script:

Code:
perl -e 'use POSIX qw/strftime/; print strftime("%Y-%m-%d",localtime(time+(14*86400)))'

 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Determine Unix Version

Is there a trick to determine the exact version from Unix that one is working with? I would have expected to see it after logon, but all I get are some Copyright-messages... I know it's some HP-UX, but I would like to know the version-number Tnx in advance! Dave (2 Replies)
Discussion started by: davegeysemans
2 Replies

2. UNIX for Dummies Questions & Answers

Cmd to determine my OS version?

I'm looking for a generic (i.e. would be resident in most/all unix flavors) internal command for determining my OS and version. When I telnet to a box here @ work, I get none of that info and can't remember the equivalent of the DOS ver command; I know I used to know this! Thanks. (2 Replies)
Discussion started by: brian.wilson
2 Replies

3. Shell Programming and Scripting

ftp - determine ascii or binary file

Hello, How to i determine via ftp commandline if files on ftp server is ascii or binary files. Like every other comon windows ftp program does it automatically. regards Thomas (5 Replies)
Discussion started by: congo
5 Replies

4. UNIX for Dummies Questions & Answers

Tru64 - how can you determine the package where a file or binary belongs to?

Dear linux-unix users, I hope that one of you will be able to help me. How can I determine to which package a file or binary belongs to. With solaris/linux package managers you can easely determine this but i cant find the way how to do this on tru64. Any help would greatly be appreciated.... (0 Replies)
Discussion started by: Crazy_lenny
0 Replies

5. Linux

A portable bootable version?

What I have been doing for some time now is installing linux on my tech machine at work, plugging in devices and transferring data with dd_rescue. What I need now is a version of linux that I can install on a laptop sata hard drive and be able to plug it into any machine to transfer data off of... (1 Reply)
Discussion started by: Methal
1 Replies

6. Solaris

How to determine, whether Sun WorkShop is installed on Solaris worksation?

How to determine, whether Sun WorkShop is installed on Solaris worksation? And if It's installed, how to start one? (2 Replies)
Discussion started by: wolfgang
2 Replies

7. Solaris

T5220 How to determine physical memory installed?

Hi, looking to upgrade memory on a pair of T5220's from 32GB to 64GB. Cannot determine current DIMM size and slots used. i.e. not sure if Qty 16 x 2GB or Qty 8 x 4GB. If there are no empty slots, i need to go with higher density DIMMs and retire exsisting the 2GB prtdiag follows. #... (3 Replies)
Discussion started by: edrew
3 Replies

8. Shell Programming and Scripting

Portable shell script advise

All, I have a need for a portable shell script for LInux and HPUX. The script has a simple need; Check for local files of a specific name (i.e. filename*), scp them to another system, and archive them to a folder. The script runs via cron. I first wrote the script in Linux (bash with gnu... (4 Replies)
Discussion started by: hburnswell
4 Replies

9. UNIX for Beginners Questions & Answers

Bash find version of an installed application but if none is found set variable to App Not Installed

Hello Forum, I'm issuing a one line bash command to look for the version of an installed application and saving the result to a variable like so: APP=application --version But if the application is not installed I want to return to my variable that the Application is not installed. So I'm... (2 Replies)
Discussion started by: greavette
2 Replies
PMDATE(1)						      General Commands Manual							 PMDATE(1)

NAME
pmdate - display an offset date SYNOPSIS
pmdate [ offset ... ] format DESCRIPTION
pmdate displays the current date and/or time, with an optional offset. An offset is specified with a leading sign (``+'' or ``-''), followed by an integer value, followed by one of the following ``scale'' spec- ifiers; S seconds M minutes H hours d days m months y years The output format follows the same rules as for date(1) and strftime(3). For example, the following will display the date a week ago as DDMMYYYY; pmdate -7d %d%m%Y PCP ENVIRONMENT
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configura- tion file, as described in pcp.conf(5). SEE ALSO
date(1), strftime(3), pcp.conf(5) and pcp.env(5). Performance Co-Pilot PCP PMDATE(1)
All times are GMT -4. The time now is 08:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy