Ah, I should not have quoted the line array=("${array_val}")
Try is with array=(${array_val}) for the last line instead. Does that help?
You might need to work with line 6 too, perhaps this would be better overall:-
Code:
array_val=""
for filename in *
do
timestamp=$(stat -c %Y $filename)
## Trim the timestamp as required or adjust it to your required format
array_val="${array_val} ${timestamp},${filename}"
done
array=(${array_val})
for item in 0 1 2 3 4 5
do
echo "Value for item $item is ${array[$item]}"
done
The date/time value is in seconds from the Epoch, else the array would split up. is that a problem? We can work on fixing it if we need to.
Hi all,
i have a directory in server A. the directory path is /home/kevin. I need to scp the directory to another server B. i would like to ask, when i do a scp of the /home/kevin , i can expect all the files from A to go B. However, how about the hidden files? for example the ssh keys in the... (4 Replies)
Hi Friends,
I need to execute a scp command to transfer some files from source to target server. Unfortunately the ftp is not working in my case.
This scp command needs to be executed via Unix script.
I need to know the complete scp command which includes the user-id and password of the... (2 Replies)
I normally download a directory recursively using:
scp -r <name>@host:<path> .
This has worked fine. As everyone knows this will download all of the directory named in <path> and all of the sub directories.
I would like to know if it is possible to not download a particular file if it... (5 Replies)
I would like to use the result of a query in another query. How do I redirect/add the output to another variable?
$result = odbc_exec($connect, $query);
while ($row = odbc_fetch_array($result)) {
echo $row,"\n";
}
odbc_close($connect);
?>
This will output hostnames:
host1... (0 Replies)
Hi,
I have a requirement as below which needs to be done viz UNIX shell script
(1) I have to connect to an Oracle database
(2) Exexute "SELECT field_status from table 1" query on one of the tables.
(3) Based on the result that I get from point (2), I have to update another table in the... (6 Replies)
Hi,
I need to query Oracle database for 100 users. I have these 100 users in a file. I need a shell script which would read this User file (one user at a time) & query database.
For instance:
USER CITY
--------- ----------
A CITY_A
B CITY_B
C ... (2 Replies)
How to copy multiple directories using single command on solaris 10 from server A to server B.
I tried scp but its working only one directory at atime
How to acheive this with simple and short solution????? (6 Replies)
Discussion started by: buzzme
6 Replies
LEARN ABOUT LINUX
dpkg::changelog::entry::debian
Dpkg::Changelog::Entry::Debian(3) libdpkg-perl Dpkg::Changelog::Entry::Debian(3)NAME
Dpkg::Changelog::Entry::Debian - represents a Debian changelog entry
DESCRIPTION
This object represents a Debian changelog entry. It implements the generic interface Dpkg::Changelog::Entry. Only functions specific to
this implementation are described below.
VARIABLES
$regex_header, $regex_trailer are two regular expressions that can be used to match a line and know whether it's a valid header/trailer
line.
The matched content for $regex_header is the source package name ($1), the version ($2), the target distributions ($3) and the options on
the rest of the line ($4). For $regex_trailer, it's the maintainer name ($1), its email ($2), some blanks ($3) and the timestamp ($4).
FUNCTIONS
my @items = $entry->get_change_items()
Return a list of change items. Each item contains at least one line. A change line starting with an asterisk denotes the start of a
new item. Any change line like "[ Raphael Hertzog ]" is treated like an item of its own even if it starts a set of items attributed to
this person (the following line necessarily starts a new item).
my @errors = $entry->check_header()
my @errors = $entry->check_trailer()
Return a list of errors. Each item in the list is an error message describing the problem. If the empty list is returned, no errors
have been found.
$entry->normalize()
Normalize the content. Strip whitespaces at end of lines, use a single empty line to separate each part.
UTILITY FUNCTIONS
my @closed_bugs = find_closes($changes)
Takes one string as argument and finds "Closes: #123456, #654321" statements as supported by the Debian Archive software in it. Returns all
closed bug numbers in an array.
AUTHOR
Raphael Hertzog <hertzog@debian.org>.
1.16.0.3 2012-04-17 Dpkg::Changelog::Entry::Debian(3)