I have a file with a list of config files numbered on the lefthand side 1-300. I need to have bash read each lines number and assign it to a variable so it can be chosen by the user called by the script later.
Ex. 1 some data
2 something else
3 more stuff
which number do you... (1 Reply)
I am working on a perl script that is used to update a list of hosts to a certain file but I am having an issue when I try to perform a check to make sure the user enters valid information. The following is what I have currently written for the script:
IPINPUT:
print "Enter IP Address: ";... (2 Replies)
Hi guys, I am working on a server where there are many users. The user names end in a 1 or a 2. I want to write a bash script that will say which users are in which group and was wondering if I could get some help. The only part I am unsure of is how to check if it ends in the number.
Here's... (2 Replies)
I am looking for perl code to get following o/p. If a line has more than 7 fields then value in field 7 onwards is BHA_GRP1, BHA_GRP2, BHA_GRP3, BHA_GRP4 etc.
Here is example of what I am trying to achieve.
INPUT File:
VAH NIC_TYPE CONFIG SIZE_GB PILO KOM BHA_GRP1 BHA_GRP2 BHA_GRP3......
2... (1 Reply)
I have a variable $max = -3;
It can be $max = +3;
I need to check if this variable is a positive/negative value.
if its positive, should print "positive" if not "negative"
How can this be done?
Thanks in advance (2 Replies)
Dear Perl users,
I need your help to solve my problem below.
I want to print the sequence number without missing number within the range.
E.g. my sequence number :
1 2 3 4 5 6 7 8 11 12 13 14
my desired output:
1 -8 , 11-14
my code below but still problem with the result:
1 - 14
1 -... (2 Replies)
Hi Experts,
I am checking how to get day in Perl.
If it is “Monday” I need to process…below is the pseudo code.
Can you please prove the code for below condition.
if (today=="Monday" )
{
while (current_time LESS THAN 9:01 AM)
... (1 Reply)
Discussion started by: ajaypatil_am
1 Replies
LEARN ABOUT NETBSD
ctype
CTYPE(3) BSD Library Functions Manual CTYPE(3)NAME
isalpha, isupper, islower, isdigit, isxdigit, isalnum, isspace, ispunct, isprint, isgraph, iscntrl, isblank, toupper, tolower, -- character
classification and mapping functions
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <ctype.h>
isalpha(int c);
isupper(int c);
islower(int c);
isdigit(int c);
isxdigit(int c);
isalnum(int c);
isspace(int c);
ispunct(int c);
isprint(int c);
isgraph(int c);
iscntrl(int c);
isblank(int c);
toupper(int c);
tolower(int c);
DESCRIPTION
The above functions perform character tests and conversions on the integer c.
See the specific manual pages for information about the test or conversion performed by each function.
EXAMPLES
To print an upper-case version of a string to stdout, the following code can be used:
const char *s = "xyz";
while (*s != '