Hi I am very new to scripting,
Can someone show me how to (in unix shell script) compare the system's date with a date in a file. The requirement is to somehow open this file (which will only have a date in it) and compare it with today's date. If they are equal execute a procedure below but if... (4 Replies)
Hello,
I am trying to show today's date and time in a better format than ‘date' (Using positional parameters). I found a command mktime and am wondering if this is the best command to use or will this also show me the time elapse since 1/30/70? Any help would be greatly appreciated, Thanks... (3 Replies)
Hello gurus,
I am hoping someone can help me with the required code/script to make this work. I have the following file with records starting at line 4:
NETW~US60~000000000013220694~002~~IT~USD~2.24~20110201~99991231~01~01~20101104~... (4 Replies)
Hi Experts,
I am trying to add one variable value as the first value in a file speparated by "" (space) delimiter. Can you please let me know how I can do this using bash script.
Following is my file.
1635 ABCD 3m9ka COMPLETE
0526 AJAY 3m1da COMPLETE
0419 INDIA 3m3zi INCOMPLETE
The... (3 Replies)
Hello,
I have a file like this:
2012112920121130
12345620121130msABowwiqiq
34477420121129amABamauee
e7748420121130ehABeheheei
in case the content of the file has the date of yesterday within the lines containing pattern AB this should be replaced by the current date. But if I use... (3 Replies)
Hi,
One of my Unix scripts needs to look for files coming in on Fridays. This script runs on Mondays. $date +"%y%m%d" will give me today's date. How can I get previous Friday's date.. can I do "today's date minus 3 days" to get Friday's date? If not, then any other way?? Name of the files is... (4 Replies)
hello,
can someone please suggest a script to rename a file that was generated today and filename that being generated daily starts with date, its a xml file.
here is example.
# find . -type f -mtime -1
./20130529_4995733057260357019.xml
#
this finename should be renamed to this format.... (6 Replies)
Hi Team,
I'm new to unix and i have a requirement to copy or move files from one directory to another based on current date mentioned in the .zip file name. Note that i need to copy only the recent zip file. please help me with the code
i tried the code as:
#! /usr/bin/sh
find... (3 Replies)
Hi Community!
Following on from this code in another thread:
#!/bin/bash
file_string=`/bin/cat date.txt | /usr/bin/awk '{print $5,$4,$7,$6,$8}'`
file_date=`/bin/date -d "$file_string"`
file_epoch=`/bin/date -d "$file_string" +%s`
now_epoch=`/bin/date +%s`
if
then
#let... (2 Replies)
Discussion started by: Greenage
2 Replies
LEARN ABOUT CENTOS
close
CLOSE(7) PostgreSQL 9.2.7 Documentation CLOSE(7)NAME
CLOSE - close a cursor
SYNOPSIS
CLOSE { name | ALL }
DESCRIPTION
CLOSE frees the resources associated with an open cursor. After the cursor is closed, no subsequent operations are allowed on it. A cursor
should be closed when it is no longer needed.
Every non-holdable open cursor is implicitly closed when a transaction is terminated by COMMIT or ROLLBACK. A holdable cursor is implicitly
closed if the transaction that created it aborts via ROLLBACK. If the creating transaction successfully commits, the holdable cursor
remains open until an explicit CLOSE is executed, or the client disconnects.
PARAMETERS
name
The name of an open cursor to close.
ALL
Close all open cursors.
NOTES
PostgreSQL does not have an explicit OPEN cursor statement; a cursor is considered open when it is declared. Use the DECLARE(7) statement
to declare a cursor.
You can see all available cursors by querying the pg_cursors system view.
If a cursor is closed after a savepoint which is later rolled back, the CLOSE is not rolled back; that is, the cursor remains closed.
EXAMPLES
Close the cursor liahona:
CLOSE liahona;
COMPATIBILITY
CLOSE is fully conforming with the SQL standard. CLOSE ALL is a PostgreSQL extension.
SEE ALSO DECLARE(7), FETCH(7), MOVE(7)PostgreSQL 9.2.7 2014-02-17 CLOSE(7)