Sponsored Content
Full Discussion: Working with bash and date
Top Forums Shell Programming and Scripting Working with bash and date Post 302489312 by Lord Spectre on Thursday 20th of January 2011 07:13:23 AM
Old 01-20-2011
Guys, please help.
I make all my test under ubuntu and redhat 5 and all working fine.
The problem is that my script should run under SunOS where the bash version is:
GNU Bash-2.05

SunOS version is
SunOS rmcs 5.9 Generic_118558-09 sun4u sparc SUNW,Sun-Fire-V440

So the previous commands doesn't works. It show me the HHMM but it doesn't substract any time!!!

Code:
root@rms /# timetmp=$(date +%H%M --date "$dte -1 minute")
root@rms /# echo $timetmp
1307
root@rms /# date
Thu Jan 20 13:07:31 CET 2011

Is there any other commands??
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

working with date

I wan to convert any field having date in the file from the follwoing format 5/1/2003 to 2003-05-01. This file is tab delimited. Please help. (2 Replies)
Discussion started by: dsravan
2 Replies

2. Homework & Coursework Questions

Date comparison with 'string date having slashes and time zone' in Bash only

1. The problem statement, all variables and given/known data: I have standard web server log file. It contains different columns (like IP address, request result code, request type etc) including a date column with the format . I have developed a log analysis command line utility that displays... (1 Reply)
Discussion started by: TariqYousaf
1 Replies

3. HP-UX

Why Bash is not working in HP-UX ?

Why Bash is not working in HP-UX ? What is similiar exe which is in HP_UX as Bash? (9 Replies)
Discussion started by: girija
9 Replies

4. Shell Programming and Scripting

date command not working

hi #!usr/bin/perl -w local ($date) = `/sbin/date "+%D %X" ` ; print $date when i run this in ksh shell it is giving the below error sh: /sbin/date: not found but same code is working and displaying date and time in sh shell. what could be the reason. pls help (10 Replies)
Discussion started by: psthariharan
10 Replies

5. Shell Programming and Scripting

Working with grep and Bash

Hi, I am currently working on a Bash shell script that - Downloads a webpage, in this case youtube.com - Extracts Number of views, Extracts Title of video, Extracts User who made it, and lastly Duration. Then I have to Out put this into columns. To me this sounds like crazyness. I'm very new... (6 Replies)
Discussion started by: Njzangel
6 Replies

6. Shell Programming and Scripting

Date command is not working properly

Hi, in my script, i take the last month by a=$(date --date '1 month ago' +%Y%m) i expect that it give me in this month "March" as result 201402, but linux gave me 201403. IMPe@ABC123:> ~/date --date '1 month ago' +%Y%m 201403 i'm reasonably confused. Any idea? Thanks in advance, ... (2 Replies)
Discussion started by: IMPe
2 Replies

7. UNIX for Dummies Questions & Answers

Date Validation not working

Hi Experts, I have a date validation script in that i will validate the date for a given format and search in the logs for that date. The script logic is very simple like below. Validate_Date() { is_valid=1 while do date_format=$(date "+$1") echo -e "Please enter the $2 date like... (6 Replies)
Discussion started by: senthil.ak
6 Replies

8. Shell Programming and Scripting

Script to get last working date

Problem : we need a command that will give previous day date and previous day should be mon-fri only. Example :if we are running a command on Monday , it will give Friday ‘s date not Sunday’s . Few more restrictions : Command should be working in NM n/w. Hard coding of date should be avoided.... (11 Replies)
Discussion started by: Downsouth
11 Replies

9. UNIX for Beginners Questions & Answers

How bash treats literal date value and retrieve year, month and date?

Hi, I am trying to add few (say 3 days) to sysdate using - date -d '+ 3 days' +%y%m%d and it works as expected. But how to add few (say 3 days) to a literal date value and how bash treats a literal value as a date. Can we say just like in ORACLE TO_DATE that my given literal date value... (2 Replies)
Discussion started by: pointers1234
2 Replies

10. Programming

Best way to get a bash script working in C

Ahoy friends. Currently i got a bash script running to manage my minecraft servers. All of them are stored in /home/minecraft_servers directory. Using my script im able to start a server (e.g. ./minecraft start ftb_continuum) because server name and server name are the same.(e.g.... (2 Replies)
Discussion started by: Knogle
2 Replies
g_rmsdist(1)					 GROMACS suite, VERSION 4.5.4-dev-20110404-bc5695c				      g_rmsdist(1)

NAME
g_rmsdist - calculates atom pair distances averaged with power -2, -3 or -6 VERSION 4.5.4-dev-20110404-bc5695c SYNOPSIS
g_rmsdist -f traj.xtc -s topol.tpr -n index.ndx -equiv equiv.dat -o distrmsd.xvg -rms rmsdist.xpm -scl rmsscale.xpm -mean rmsmean.xpm -nmr3 nmr3.xpm -nmr6 nmr6.xpm -noe noe.dat -[no]h -[no]version -nice int -b time -e time -dt time -[no]w -xvg enum -nlevels int -max real -[no]sumh -[no]pbc DESCRIPTION
g_rmsdist computes the root mean square deviation of atom distances, which has the advantage that no fit is needed like in standard RMS deviation as computed by g_rms. The reference structure is taken from the structure file. The RMSD at time t is calculated as the RMS of the differences in distance between atom-pairs in the reference structure and the structure at time t. g_rmsdist can also produce matrices of the rms distances, rms distances scaled with the mean distance and the mean distances and matrices with NMR averaged distances (1/r3 and 1/r6 averaging). Finally, lists of atom pairs with 1/r3 and 1/r6 averaged distance below the maximum distance ( -max, which will default to 0.6 in this case) can be generated, by default averaging over equivalent hydrogens (all triplets of hydrogens named *[123]). Additionally a list of equivalent atoms can be supplied ( -equiv), each line containing a set of equivalent atoms specified as residue number and name and atom name; e.g.: 3 SER HB1 3 SER HB2 Residue and atom names must exactly match those in the structure file, including case. Specifying non-sequential atoms is undefined. FILES
-f traj.xtc Input Trajectory: xtc trr trj gro g96 pdb cpt -s topol.tpr Input Structure+mass(db): tpr tpb tpa gro g96 pdb -n index.ndx Input, Opt. Index file -equiv equiv.dat Input, Opt. Generic data file -o distrmsd.xvg Output xvgr/xmgr file -rms rmsdist.xpm Output, Opt. X PixMap compatible matrix file -scl rmsscale.xpm Output, Opt. X PixMap compatible matrix file -mean rmsmean.xpm Output, Opt. X PixMap compatible matrix file -nmr3 nmr3.xpm Output, Opt. X PixMap compatible matrix file -nmr6 nmr6.xpm Output, Opt. X PixMap compatible matrix file -noe noe.dat Output, Opt. Generic data file OTHER OPTIONS
-[no]hno Print help info and quit -[no]versionno Print version info and quit -nice int 19 Set the nicelevel -b time 0 First frame (ps) to read from trajectory -e time 0 Last frame (ps) to read from trajectory -dt time 0 Only use frame when t MOD dt = first time (ps) -[no]wno View output .xvg, .xpm, .eps and .pdb files -xvg enum xmgrace xvg plot formatting: xmgrace, xmgr or none -nlevels int 40 Discretize rms in levels -max real -1 Maximum level in matrices -[no]sumhyes average distance over equivalent hydrogens -[no]pbcyes Use periodic boundary conditions when computing distances SEE ALSO
gromacs(7) More information about GROMACS is available at <http://www.gromacs.org/>. Mon 4 Apr 2011 g_rmsdist(1)
All times are GMT -4. The time now is 09:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy