Hi All,
I am trying to schedule a one time job using the at command with the help of shell script for my project. The shell script should take a parameter as a command line argument from the at command itself. Is it possible to take a command line parameter for a shell script in the command... (3 Replies)
Hi Friends,
Can any of you explain me about the below line of code?
mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`
Im not able to understand, what exactly it is doing :confused:
Any help would be useful for me.
Lokesha (4 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
I want to list all files/lines which except those which contain the pattern ' /proc/' OR ' /sys/' (mind the leading blank).
In a first approach I coded:
find / -exec ls -ld {} | grep -v ' /proc/| /sys/' \; > /tmp/list.txt
But this doesn't work. I got an error (under Ubuntu):
grep:... (5 Replies)
I have a bunch of random character lines like ABCEDFG. I want to find all lines with "A" and then change any "E" to "X" in the same line. ALL lines with "A" will have an "X" somewhere in it. I have tried sed awk and vi editor. I get close, not quite there. I know someone has already solved this... (10 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hi all,
i face an error related to my server ""it's running server"" when i use sqlplus command
$ sqlplus
bash: sqlplus: command not found
the data base is up and running i just need to access the sqlplus to import the dump file as a daily backup.
i already check the directory... (4 Replies)
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Hi everybody,
I am new at Unix/Bourne shell scripting and with my youngest experiences, I will not become very old with it :o
My code:
#!/bin/sh
set -e
set -u
export IFS=
optl="Optl"
LOCSTORCLI="/opt/lsi/storcli/storcli"
($LOCSTORCLI /c0 /vall show | grep RAID | cut -d " "... (5 Replies)
Greetings,
The title pretty much says it all. I've snooped everywhere and can't find anything on this. Since our organization went to numeric usernames, using the u|U option for ps returns no processes. Example passwd entry:
320074:DjZAJKXun8HBs:10129:6006:Joe Y:/cadhome/analysis/jy:/bin/bash... (4 Replies)
Discussion started by: crimso
4 Replies
LEARN ABOUT DEBIAN
net::sftp::foreign::attributes
Net::SFTP::Foreign::Attributes(3pm) User Contributed Perl Documentation Net::SFTP::Foreign::Attributes(3pm)NAME
Net::SFTP::Foreign::Attributes - File/directory attribute container
SYNOPSIS
use Net::SFTP::Foreign;
my $a1 = Net::SFTP::Foreign::Attributes->new();
$a1->set_size($size);
$a1->set_ugid($uid, $gid);
my $a2 = $sftp->stat($file)
or die "remote stat command failed: ".$sftp->status;
my $size = $a2->size;
my $mtime = $a2->mtime;
DESCRIPTION
Net::SFTP::Foreign::Attributes encapsulates file/directory attributes for Net::SFTP::Foreign. It also provides serialization and
deserialization methods to encode/decode attributes into Net::SFTP::Foreign::Buffer objects.
USAGE
Net::SFTP::Foreign::Attributes->new()
Returns a new "Net::SFTP::Foreign::Attributes" object.
Net::SFTP::Foreign::Attributes->new_from_buffer($buffer)
Creates a new attributes object and populates it with information read from $buffer.
$attrs->as_buffer
Serializes the Attributes object $attrs into a buffer object.
$attrs->flags
returns the value of the flags field.
$attrs->size
returns the values of the size field or undef if it is not set.
$attrs->uid
returns the value of the uid field or undef if it is not set.
$attrs->gid
returns the value of the gid field or undef if it is not set.
$attrs->perm
returns the value of the permissions field or undef if it is not set.
See also "stat" in perlfunc for instructions on how to process the returned value with the Fcntl module.
For instance, the following code checks if some attributes object corresponds to a directory:
use Fctnl qw(S_ISDIR);
...
if (S_ISDIR($attr->perm)) {
# it is a directory!
}
$attrs->atime
returns the value of the atime field or undef if it is not set.
$attrs->mtime
returns the value of the mtime field or undef if it is not set.
%extended = $attr->extended
returns the vendor-dependent extended attributes
$attrs->set_size($size)
sets the value of the size field, or if $size is undef removes the field. The flags field is adjusted accordingly.
$attrs->set_perm($perm)
sets the value of the permsissions field or removes it if the value is undefined. The flags field is also adjusted.
$attr->set_ugid($uid, $gid)
sets the values of the uid and gid fields, or removes them if they are undefined values. The flags field is adjusted.
This pair of fields can not be set separatelly because they share the same bit on the flags field and so both have to be set or not.
$attr->set_amtime($atime, $mtime)
sets the values of the atime and mtime fields or remove them if they are undefined values. The flags field is also adjusted.
$attr->set_extended(%extended)
sets the vendor-dependent extended attributes
$attr->append_extended(%more_extended)
adds more pairs to the list of vendor-dependent extended attributes
COPYRIGHT
Copyright (c) 2006-2008 Salvador Fandin~o.
All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-05-11 Net::SFTP::Foreign::Attributes(3pm)