06-02-2016
Script to find a date variable and increment it
Hi,
I have parameter file wo_location.prm which has a date variable $last_upd_date= 02032016.
I need to write a unix shell script to find that variable and increment it by 1 day.
The path to the file is root/dir_lc/shared/param/wo_location.prm and the variable is $last_upd_date.
Any assistance would be highly appreciated.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to increment date, using Shell Script, a loop to add one day after 24hrs. :confused:
Cheers
Kunal (1 Reply)
Discussion started by: niceboykunal123
1 Replies
2. Shell Programming and Scripting
I need to increment a date value through shell script.
Input value consist of start date and end date in DATE format of unix.
For eg.
I need increment a date value of 1/1/09 to 31/12/09 i.e for a whole yr.
The output must look like
1/1/09
2/2/09
.
.
.
31/1/09
.
.
1/2/09
.
28/2/09... (1 Reply)
Discussion started by: sunil087
1 Replies
3. Shell Programming and Scripting
Hi,
Iam new to scripting language.:o
can someone help me out solving this thread?hopingly ya....:)
I want to write a script which connects to db and searches the count in a table which has date column and id column.
If the count is not equal to 0 then it should increment the date with the one... (4 Replies)
Discussion started by: jyothi_wipro
4 Replies
4. Shell Programming and Scripting
Hi,
I have a perl script which prints epoch value of date in milliseconds as the output.
My reuirement is that once the output is printed,the day variable shld increment by 1 and when i execute the script for the second time the output shld be for the new day value.
My script looks as... (11 Replies)
Discussion started by: jyothi_wipro
11 Replies
5. Shell Programming and Scripting
hi experts,
my requirement is like this i need to develop a shell script to update date part with new incremental date time in file some 'X' which is kept at some server location incrementing every two hours.as i am new to this scripting i need support from u people,thanx in advance (1 Reply)
Discussion started by: amanmro
1 Replies
6. Shell Programming and Scripting
I want to have a script to create directory labled with the date, convert a load of flac files to mp3 and then find and rysnc the newly created mp3 file to the dated directory. Here's what I have done so far but the rsync command doesn't work:
#!/bin/bash
#set date variable as now... (0 Replies)
Discussion started by: barrydocks
0 Replies
7. Shell Programming and Scripting
Need to increment the date from "currentdate + 90days" inside the for loop (i=1 to i=50) (5 Replies)
Discussion started by: aroragaurav.84
5 Replies
8. Shell Programming and Scripting
Hi All,
I have a file which has hundred of records with fixed number of fields. In each record there is set of 8 characters which represent the duration of that activity. I want to sum up the duration present in all the records for a report. The problem is the duration changes per record so I... (5 Replies)
Discussion started by: danish0909
5 Replies
9. Shell Programming and Scripting
hey guys,
I need to incerement the date variable for instance
echo `date '+%F %H:%M:00'`
this produces
2014-08-02 20:05:00
-I will grant this to : $Datehour and need to assign 1 hr from now to $Datelasthour
-the script time will be used to talk to DB system information.
however... (4 Replies)
Discussion started by: mo_VERTICASQL
4 Replies
LEARN ABOUT HPUX
pthread_condattr_setpshared
pthread_condattr_getpshared(3T) pthread_condattr_getpshared(3T)
NAME
pthread_condattr_getpshared(), pthread_condattr_setpshared() - get or set the process-shared attribute
SYNOPSIS
PARAMETERS
attr Pointer to the condition variable attributes object whose process-shared attribute is to be set/retrieved.
pshared This parameter either specifies the new value of the process-shared attribute (set function) or it points to the memory
location where the process-shared attribute of attr is to be returned (get function).
DESCRIPTION
The attributes object attr must have been previously initialized with the function before these functions are called.
The functions are used to set and retrieve the process-shared attribute in a condition variable attributes object. The legal values for
the process-shared attribute are:
This option permits a condition variable to be operated upon by any thread
that has access to the memory where the condition variable is allocated. The application is responsible for allocating the
condition variable in memory that multiple processes can access.
The condition variable can be operated on only by threads created within
the same process as the thread that initialized the condition variable. If threads of differing processes attempt to operate
on such condition variable, the behavior is undefined.
The default value of process-shared is
sets the process-shared attribute in attr. The new value of the process-shared attribute of attr is set to the value specified in the
pshared parameter.
retrieves the value of the process-shared attribute from attr. The value of the process-shared attribute of attr is returned in the
pshared parameter.
RETURN VALUE
Upon successful completion, and return zero. Otherwise, an error number is returned to indicate the error (the variable is not set).
ERRORS
If any of the following occur, the and functions return the corresponding error number:
is not defined and these functions are not supported.
For each of the following conditions, if the condition is detected, the function returns the corresponding error number:
attr is not a valid condition variable attributes object.
The value specified by
pshared is not a legal value.
For each of the following conditions, if the condition is detected, the function returns the corresponding error number:
The value specified by
attr or pshared is invalid.
WARNINGS
If a condition variable is created with the process-shared attribute defined as the cooperating processes should have access to the memory
in which the condition variable is allocated.
AUTHOR
and were derived from the IEEE POSIX P1003.1c standard.
SEE ALSO
pthread_create(3T), pthread_condattr_init(3T), pthread_cond_init(3T), pthread_mutex_init(3T).
STANDARDS CONFORMANCE
Pthread Library pthread_condattr_getpshared(3T)