I'm trying to move files based on a certain day..my question is on array's, what's wrong with the way I'm stepping through the array? what i have gives me syntax errors..any ideas...so far I have
#! /bin/bash
sun_d=`cal |grep -v |awk '{printf " " $1}' `
echo "$sun_d"
ls -l... (1 Reply)
Hi,
I wish to store $string1 in $string1array a character in each array element.
Then i wish to echo the entire array to the screen so that it reads as the normal string again.
I have been trying with the code below but does not work. Please help...
To put string into array:
... (5 Replies)
I am facing a strange error while creating posix threads:
Given below are two snippets of code, the first one works whereas the second one gives a garbage value in the output.
Snippet 1
This works:
--------------
int *threadids;
threadids = (int *) malloc (num_threads * sizeof(int));
... (4 Replies)
Hi All,
I'm writing a nagios check that will see if our ldap servers are in sync...
I got the status data into a nested array, I would like to search key of each array and if "OK" is NOT present, echo other key=>values in the current array to a variable
so...eg...let take the single array... (1 Reply)
Hi Everyone,
#!/usr/bin/perl
use strict;
use warnings;
my @test=("a;b;qqq;c;d","a;b;ggg;c;d","a;b;qqq;c;d");
would like to split the @test array into two array:
@test1=(("a;b;qqq;c;d","a;b;qqq;c;d"); and @test2=("a;b;ggg;c;d");
means search for 3rd filed.
Thanks
find the... (0 Replies)
Hi
I want to write a script which store all the parameters passed to the script into an array.
Once it is stored I want scan through the array and and delete those files for last month present inside the directory. The files in directory is appneded with YYYY_MM_DD.
I want to know how can I... (3 Replies)
I have an array and two variables as below,
I need to check if $datevar is present in $filename.
If so, i need to replace $filename with the values in the array.
I need the output inside an ARRAY
How can this be done.
Any help will be appreciated. Thanks in advance. (2 Replies)
sorry I am new to the bash scripting since I was used to c shell programming. I am writting a script in bash for which I have to create an array in bash. I was able to do parse one variable through command line by doing": Lets say the below code is part of temp.bash and is called like:
temp.bash... (5 Replies)
Trying to do some control flow parsing based on the index postion of an array member. Here is the pseudo code I am trying to write in (preferably in pure bash) where possible. I am thinking regex with do the trick, but need a little help.
pesudo code
if == ENDSINFIVEINTS ]]; then
do... (4 Replies)
hello,
i need a bit of help on how to do this effectively in bash without a lot of extra looping or massive switch/case
i have a long array of M elements and a short array of N elements, so M > N always. M is not a multiple of N.
for case 1, I want to stretch N to fit M
arrayHuge
H = (... (2 Replies)
Discussion started by: f77hack
2 Replies
LEARN ABOUT PHP
finger
finger(1) User Commands finger(1)NAME
finger - display information about local and remote users
SYNOPSIS
finger [-bfhilmpqsw] [username...]
finger [-l] [ username@hostname 1 [ @hostname 2 .. .@hostname n...]]
finger [-l] [ @hostname 1 [ @hostname 2 .. .@hostname n...]]
DESCRIPTION
By default, the finger command displays in multi-column format the following information about each logged-in user:
o user name
o user's full name
o terminal name (prepended with a `*' (asterisk) if write-permission is denied)
o idle time
o login time
o host name, if logged in remotely
Idle time is in minutes if it is a single integer, in hours and minutes if a `:' (colon) is present, or in days and hours if a `d' is
present.
When one or more username arguments are given, more detailed information is given for each username specified, whether they are logged in
or not. username must be that of a local user, and may be a first or last name, or an account name. Information is presented in multi-line
format as follows:
o the user name and the user's full name
o the user's home directory and login shell
o time the user logged in if currently logged in, or the time the user last logged in; and the terminal or host from which the user
logged in
o last time the user received mail, and the last time the user read mail
o the first line of the $HOME/.project file, if it exists
o the contents of the $HOME/.plan file, if it exists
Note: when the comment (GECOS) field in /etc/passwd includes a comma, finger does not display the information following the comma.
If the arguments username@hostname1[@hostname2...@hostnamen] or @hostname1[@hostname2...@hostnamen] are used, the request is sent first to
hostnamen and forwarded through each hostnamen-1 to hostname1. The program uses the finger user information protocol (see RFC 1288) to
query that remote host for information about the named user (if username is specified), or about each logged-in user. The information dis-
played is server dependent.
As required by RFC 1288, finger passes only printable, 7-bit ASCII data. This behavior may be modified by a system administrator by using
the PASS option in /etc/default/finger. Specifying PASS=low allows all characters less than decimal 32 ASCII. Specifying PASS=high allows
all characters greater than decimal 126 ASCII. PASS=low,high or PASS=high,low allows both characters less than 32 and greater than 126 to
pass through.
OPTIONS
The following options are supported, except that the username@hostname form supports only the -l option:
-b Suppresses printing the user's home directory and shell in a long format printout.
-f Suppresses printing the header that is normally printed in a non-long format printout.
-h Suppresses printing of the .project file in a long format printout.
-i Forces "idle" output format, which is similar to short format except that only the login name, terminal, login time, and idle time
are printed.
-l Forces long output format.
-m Matches arguments only on user name (not first or last name).
-p Suppresses printing of the .plan file in a long format printout.
-q Forces quick output format, which is similar to short format except that only the login name, terminal, and login time are
printed.
-s Forces short output format.
-w Suppresses printing the full name in a short format printout.
FILES
$HOME/.plan user's plan
$HOME/.project user's projects
/etc/default/finger finger options file
/etc/passwd password file
/var/adm/lastlog time of last login
/var/adm/utmpx accounting
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWrcmds |
+-----------------------------+-----------------------------+
SEE ALSO passwd(1), who(1), whois(1), passwd(4), attributes(5)
Zimmerman, D., The Finger User Information Protocol, RFC 1288, Center for Discrete Mathematics and Theoretical Computer Science (DIMACS),
Rutgers University, December 1991.
NOTES
The finger user information protocol limits the options that may be used with the remote form of this command.
SunOS 5.10 6 Nov 2000 finger(1)