08-23-2002
I'm glad it worked!
For future reference, which site did you get it from?
It'd be usefull to have around...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I need help to do some calculation in script.
I have a monitor program (munin) that I would like to log uptime information from a server.
The script looks like this (not complete):
#!/bin/sh
# server_uptime
### Config Start
# Reads the server parameters using the HTTP port with... (7 Replies)
Discussion started by: Jotne
7 Replies
2. UNIX for Advanced & Expert Users
Hello,
I have an AIX 5.3 system and i created a script to get the last login of users.
The script goes like this:
LAST_LOGIN=`lsuser -a time_last_login $cur_user`
TIME_LOGIN=`perl -e 'print scalar localtime("$LAST_LOGIN")'`
Actually what i do in these two lines is to set a variable... (2 Replies)
Discussion started by: omonoiatis9
2 Replies
3. Shell Programming and Scripting
Hi,
Thanks bartus11 yesterday's code worked fine for me.
In meantime I've found another "issue".
As you can see highlighted, the time format in my original input in case of two rows which should be duplicited ,is differentwhat I need to do is to convert to this format "20110607-08:03:22"... (4 Replies)
Discussion started by: hernand
4 Replies
4. Shell Programming and Scripting
I can not find a working script or way to do this on sun solaris , can someone please guide me?
e.g 1327329935 epoch secs = 012312 (ddmmyy)
thanks (5 Replies)
Discussion started by: aliyesami
5 Replies
5. UNIX for Dummies Questions & Answers
I'd like to convert a date string in the form of sun aug 19 09:03:10 EDT 2012, to unixtime timestamp using awk.
I tried
This is how each line of the file looks like, different date and time in this format
Sun Aug 19 08:33:45 EDT 2012, user1(108.6.217.236) all: test on the 17th
... (2 Replies)
Discussion started by: bkkid
2 Replies
6. Shell Programming and Scripting
# date +%s -d "Mon Feb 11 02:26:04"
1360567564
# perl -e 'print scalar localtime(1360567564), "\n";'
Mon Feb 11 02:26:04 2013
the epoch conversion is working fine. but one of my application needs 13 digit epoch time as input
1359453135154
rather than 10 digit epoch time 1360567564... (3 Replies)
Discussion started by: vivek d r
3 Replies
7. UNIX for Dummies Questions & Answers
I have a Raspberry Pi that logs some temperatures using Onewire. Data is collected with RRDTool.
The command sudo rrdtool fetch ute_temp.rrd AVERAGE -s -1h > ./test.log
and then cat test.log gives the result
1388608500: 2.3579639836e+00
.
How do I write a script that converts the Epoch time... (4 Replies)
Discussion started by: nilekl
4 Replies
8. Shell Programming and Scripting
I am trying to create a script that will take epoch (input from command line) and convert it into a readable format in bash/shell
---------- Post updated at 08:03 PM ---------- Previous update was at 07:59 PM ----------
#!bin/bash
read -p "Please enter a number to represent epoch time:"... (9 Replies)
Discussion started by: sprocket
9 Replies
9. Shell Programming and Scripting
I have a list of time spans in seconds, and want to compute the time span
as hh:mm:nn
I am coding in bash and have coded the following. However, the results are
wrong as "%.0f" rounds the values.
Example:
ftm: 25793.5
tmspan(hrs,min,sec): 7.16 429.89 25793.50
hh: 7
mm: 10
ss:... (2 Replies)
Discussion started by: kristinu
2 Replies
10. Shell Programming and Scripting
Hello,
How can we convert date like format 20181004171050 in seconds ?
I can able to convert till date but failing for HHMMSS.
date -d "20181004" "+%s" output as 1538596800 .
But when i add hhmmss it is failing date -d "20181004172000" "+%s" result Invalid date
Kindly guide.
Regards (16 Replies)
Discussion started by: sadique.manzar
16 Replies
LEARN ABOUT DEBIAN
mkgeo_grid
mkgeo_grid(1rheolef) rheolef-6.1 mkgeo_grid(1rheolef)
NAME
mkgeo_grid -- build a strutured mesh of a parallelotope, in 1d, 2d or 3d
SYNOPSIS
mkgeo_grid options [nx [ny [nz]]]
EXAMPLE
The following command build a triangular based 2d 10x10 grid of the unit square:
mkgeo_grid -t 10 > square-10.geo
geo square-10.geo
or in one comand line:
mkgeo_grid -t 10 | geo -
DESCRIPTION
This command is usefull when testing programs on simple geometries. It avoid the preparation of an input file for a mesh generator. The
optional nx, ny and nz arguments are integer that specifies the subdivision in each direction. By default nx=10, ny=nx and nz=ny. The mesh
files goes on standard output.
The command supports all the possible element types: edges, triangles, rectangles, tetraedra, prisms and hexahedra.
ELEMENT TYPE OPTIONS
-e 1d mesh using edges.
-t 2d mesh using triangles.
-q 2d mesh using quadrangles (rectangles).
-T 3d mesh using tetraedra.
-P 3d mesh using prisms.
-H 3d mesh using hexahedra.
THE GEOMETRY
The geometry can be any [a,b] segment, [a,b]x[c,d] rectangle or [a,b]x[c,d]x[f,g] parallelotope. By default a=c=f=0 and b=d=g=1, thus, the
unit boxes are considered. For instance, the following command meshes the [-2,2]x[-1.5, 1.5] rectangle:
mkgeo_grid -t 10 -a -2 -b 2 -c -1.5 -d 1.5 | geo -
-a float
-b float
-c float
-d float
-f float
-g float
BOUNDARY DOMAINS
-sides
-nosides
The boundary sides are representd by domains: left, right, top, bottom,front and back.
-boundary
-noboundary
This option defines a domain named boundary that groups all sides. By default, both sides and the whole boundary are defined as
domains:
mkgeo_grid -t 10 > square.geo
geo square.geo
mkgeo_grid -t 10 -nosides > square.geo
geo square.geo
mkgeo_grid -t 10 -noboundary > square.geo
geo square.geo
mkgeo_grid -t 10 -noboundary -nosides > square.geo
geo square.geo
REGIONS
-region
-noregion
The whole domain is splitted into two subdomains: east and west, This option is used for testing computations with subdomains (e.g.
transmission problem; see the user manual).
mkgeo_grid -t 10 -region | geo -
CORNERS
-corner
-nocorner
The corners (four in 2D and eight in 3D) are defined as OD-domains. This could be usefull for some special boundary conditions.
mkgeo_grid -t 10 -corner | geo -
mkgeo_grid -T 5 -corner | geo -
COORDINATE SYSTEM OPTION
Most of rheolef codes are coordinate-system independant. The coordinate system is specified in the geometry file `.geo'.
-zr
-rz the 2d mesh is axisymmetric: zr (resp. rz) stands when the symmetry is related to the first (resp. second) coordinate.
FILE FORMAT OPTION
rheolef-6.1 rheolef-6.1 mkgeo_grid(1rheolef)