10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How to check the user input to be valid using shell script?
The valid input is in the format like as follows.
1. It can only have r,w,x or a hyphen and nothing else.
2. ensure the r, w, x are in the correct order.
for example: rwxr-xr-x is a valid format.
Thanks (5 Replies)
Discussion started by: hyeewang
5 Replies
2. Shell Programming and Scripting
Hi,
echo "Enter file name of input file list along with absolute path : "
read inputFileList
if
then
for string in `cat inputFileList`
do
echo $string
done
else
echo " file does not exist"
fi
From the above code, if the user enters a invalid file... (1 Reply)
Discussion started by: i.srini89
1 Replies
3. Shell Programming and Scripting
Hi everyone,
I cant seem to figure this out for the life of me. Basically, I have two arrays..
sub init {
use Getopt::Long;
use Data::Dumper;
my @selections = ();
my @valid_options = ( "vaild1", "valid2" );
GetOptions( "input=s" =>... (2 Replies)
Discussion started by: ckozler
2 Replies
4. UNIX for Dummies Questions & Answers
Ok so this is sort of a unix question. I am frequently logging into customers boxes and our product integrates with Active directory.
I deal with a great deal of people who have no business being admins but are and they don't know squat about their network or their DC's. So a recurring problem... (4 Replies)
Discussion started by: MrEddy
4 Replies
5. Homework & Coursework Questions
Could someone help me by midnight tonight!!!
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Insert a reference to the Bourne shell as the command... (0 Replies)
Discussion started by: cody007
0 Replies
6. Shell Programming and Scripting
Experts,
In a script i get the following error:
The specified substitution is not valid for this command
Do you have any idea what is wrong with it?
TITLE="Code Checker" # Script Titel #
EXT="_UA99" # Eind van dirnaam #
FILE="job.dat" # Zoekbestandsnaam #
SEARCH="returncode 0" #... (1 Reply)
Discussion started by: klaasjan
1 Replies
7. Programming
#include <iostream>
#include<stdio.h>
using namespace std;
class a
{
public:
int xx;
a()
{
cout << "in CONS a \n";
}
~a()
{
cout << "in DES a \n";
}
}; (1 Reply)
Discussion started by: crackthehit007
1 Replies
8. Shell Programming and Scripting
Hello,
I am trying to write an expect script that will ssh into a large number of Cisco routers and add some commands via the cli. The script I wrote works great for one host however I have over 350 routers that this needs to be added to. The problem is I cannot get the script to read the file of... (1 Reply)
Discussion started by: meberline
1 Replies
9. Shell Programming and Scripting
Hi Folks,
I'm using bash script. I would like to check whether input is a number or not.(Only positive numbers).. if space or non numeric is entered, it should say "invalid input". pls help..
thanks in adv.
Br///
Vijay. (1 Reply)
Discussion started by: Vijayakumarpc
1 Replies
10. Programming
hey , everyone. I have a few questions about pieces of code and was wondering if someone could tell me what exactly they did or if they are even valid.
bool1 && bool2 || bool3 <---in what order do these get processed?
if (! isdigit(c)) <---What does this do?
i = j % 3; <---what does this do?... (4 Replies)
Discussion started by: bebop1111116
4 Replies