Can a powershell program be converted to shell script code in unix?
Here's the powershell code . It extracts users' manager names from the Active directory and then exports the data to a csv file.
Code:
Can the below powershell code be converted to shell script program in unix and get the same results?
How can I get the list of logged in users in the system programmatically?
I can get the list with 'who' or 'users' commands but I need to get the list programmatically...
May someone help, please?
Thanks in advance. (2 Replies)
Actually.I have 2 questions to ask.
1. how to list locked account in hp-ux?
2.how to list locked account in linux(redhat)?
I can use the command "passwd -S -username" to list a account who were locked .
who knows how to list all locked accounts with one command.
Thanks!! (5 Replies)
I need to add to a BASH script if ${USER} is not in a list of users (smitha, brownd, adamsp) then do something... what is the best shortest way to accomplish an if statement with a list like this? Also the list of users should be in the script, not an external file.
Thanks! (5 Replies)
Hi
I am new to unix so hopefully someone can help. I need to list all the users I have in my unix enviroment (AIX) and the groups (primary and secondary) they belong to.
Can anyone help?
Many thanks in advance (2 Replies)
Hello!Does anybody know how to solve this script:
,,write a shell script which displays a list of names of users who have created files "*. c" in the last day."? (1 Reply)
Hi
i would like to know were the folder that contain file with list of all users ?
And were i can learn about what kind of folder i have and wheat they have inside?
question 2.
when i write ls -a i see all directories and then i choose for example Documents
and inside Documents i typed again... (1 Reply)
Hi All
i need to write something in perl that on a mac list all the users accounts, and then carries out a copy, ( rsync ) on each one it finds.
i was going to use glob, but i want to exclude a certain result here is what i have
use Getopt::Std;
use POSIX qw(tmpnam);
use lib... (1 Reply)
Hello!
We have an AIX box (6.3), we are looking for a way to get list of logged in users and their IP. The issue we have is running who -ub shows hostname and we are wanting to get the ip. Any suggestions of ideas? Thanks in advance for any help! (4 Replies)
Discussion started by: entropy1980
4 Replies
LEARN ABOUT DEBIAN
text::csv::encoded::coder::encodeguess
Text::CSV::Encoded::Coder::EncodeGuess(3pm) User Contributed Perl Documentation Text::CSV::Encoded::Coder::EncodeGuess(3pm)NAME
Text::CSV::Encoded::Coder::EncodeGuess - Text::CSV::Encoded coder class using Encode::Guess
SYNOPSIS
use Text::CSV::Encoded coder_class => 'Text::CSV::Encoded::Coder::EncodeGuess';
use Spreadsheet::ParseExcel;
my $csv = Text::CSV::Encoded->new();
$csv->encoding( ['ucs2', 'ascii'] ); # guessing ucs2 or ascii?
$csv->encoding_to_combine('shiftjis');
my $excel = Spreadsheet::ParseExcel::Workbook->Parse( $file );
my $sheet = $excel->{Worksheet}->[0];
for my $row ( $sheet->{MinRow} .. $sheet->{MaxRow} ) {
my @fields;
for my $col ( $sheet->{MinCol} .. $sheet->{MaxCol} ) {
my $cell = $sheet->{Cells}[$row][$col];
push @fields, $cell->{Val};
}
$csv->combine( @fields ) or die;
print $csv->string, "
";
}
DESCRIPTION
This module is inherited from Text::CSV::Encoded::Coder::Encode.
USE
Except for 2 attributes, same as Text::CSV::Encoded::Coder::Encode.
encoding_in
$csv = $csv->encoding_in( $encoding_list_ref );
The accessor to an encoding for pre-parsing CSV strings. If no encoding is given, returns current $encoding, otherwise the object itself.
$encoding_list_ref = $csv->encoding_in()
When you pass a list reference, it might guess the encoding from the given list.
$csv->encoding_in( ['shiftjis', 'euc-jp', 'iso-20022-jp'] );
If it cannot guess the encoding, the first encoding of the list is used.
encoding
$csv = $csv->encoding( $encoding_list_ref );
$encoding_list_ref = $csv->encoding();
You can pass a list reference to this attribute only:
* For list data consumed by combine().
* For list reference returned by getline().
In other word, in "combine" and "print", it might guess an encoding for the passing list data. If it cannot guess the encoding, the first
encoding of the list is used.
SEE ALSO
Encode, Encode::Guess
AUTHOR
Makamaka Hannyaharamitu, <makamaka[at]cpan.org>
COPYRIGHT AND LICENSE
Copyright 2008-2010 by Makamaka Hannyaharamitu
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2010-04-26 Text::CSV::Encoded::Coder::EncodeGuess(3pm)