Hi
In the shell scripted I'm trying to write!
I would like to test the last character in a string. The string is a path/directory and I want to see if the last character is a '/'.
The string (path/directory) is inputted by a user. If the '/' character isn't present then I want to be able to... (11 Replies)
Hi All
Can anyone let me have a easy way to test if no input was given to a standard read. I would think of using the lenght of the variable, however this seems to be a long cut.
Thx
J (8 Replies)
Hello,
I need to determine if a file I have is empty or not. How can I go about doing this in shell scripting? Some sample code would be appreciated?
Thanks, (6 Replies)
Hi,
I want to test a var, $inputPin to see if is 3 digits in a row or not in a Bash script.
I am getting stuck on the regex to do this.
And the equality test if it is in an if statement as below?
-ne is for comparing numbers
But I guess it would be != in this case
if \{3,3\]}]
... (6 Replies)
Hi guys
I have problem with my simple calculator, author of my book wrote
One way I tried is to test if one the inpur number is grater than zero, and then substatct
And my protptype function is
#include <stdio.h>
int main(void) {
float a, b , result;
... (11 Replies)
Hello Scripting Czars
I have written one script, which does the Openssl Connection test to 1000's of server's , but before it finally takes off , its error-ring out, kindly take a look into this.
#!/bin/bash
#Script to Test Connectivity withListen Address & Port Address
#Script... (10 Replies)
Hi all,
I have a flat file storing data like this,
Testing,
What I'm trying to do is to retrieve the data "1", "2" and "3".
So far I manage retrieve the data by using the code below,
while (getline(file, line))
{
if (line.find("Testing")!=string::npos)
... (5 Replies)
Hello, can someone please explain to me why this happens:
myserver#echo "$nothing"
myserver#if ; then echo "nothing is a zero length string"; fi
nothing is a zero length string
myserver#if ; then echo "nothing is also a non-zero length string, apparently"; fi
nothing is also a non-zero... (5 Replies)
Hi folks...
I am working on a project where I need to have online bash bash shell integrated in my web page. I am not clear of how to do it. can any one suggest?? The UI needs to be developed in c#. (11 Replies)