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:
Create a script called DOTS that will display the horizontal or vertical number of dots if the first argument entered after the dots command will be h or v.
ust use the while statement.
3. The attempts at a solution (include all code and scripts):
This is the error wnen I run the command:
4. Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
John Abbott College, Montreal QC, CANADA, Oswaldo Moreno, Operating Systems UNIX. There is no direct link to the course itself.
Note: Without school/professor/course information, you will be banned if you post here! You must complete the entire template (not just parts of it).
To handle both "h" (horizontal dots) and "v" (vertical dots) in the same script you will need to change the structure of the script slightly bearing in mind the previous post about the different ways of comparing strings and integers.
A script becomes easier to read if we save the input parameters to named variables early in the script.
I am trying to get the file extension with file names that could contain multiple dots using shell scripting. I want to find a way using the sed command.
Example Filenames:
one.dat
one.dat.002
Results:
dat
I would like to return dat in both instances using the sed command. How can I... (4 Replies)
Hi,
I have a requirement like i have to search a script and find names that conatins more than two dots, if so then throw error.
For ex: a1.b1.comname here i have to find comname and check two dots. it will not throw error
a1.b1.c1.comname here it contains more than 2dots it will throw... (3 Replies)
Hi all,
I have files in the filename pattern of,
this.is.the.name.of.my.file.mov
and I would like to remove dots (.) and replace them with spaces ( ) so the output would be,
this is the name of my file.mov
The other issue that I have is that the number of dots (.) in the file... (6 Replies)
I posted this already in another thread, but was told that I should create a seperate thread for the following question:
How do I strip the extension when the delimiter might occur multiple times in the filename?
For example:
I have 2 files as input for my script.
test.extension... (8 Replies)
Point.h
#pragma once
#include <iostream>
using namespace std;
class Point
{
private:
int x;
int y;
public:
Point(void);
Point( int x, int y );
Point( const Point &xPoint );
~Point(void); (0 Replies)
maximum number of dots in a domain name - not a sub-domain name.
for example:
mydomain.com ------ one dot
mydomain.com.au ------ two dots
do you know maximum number of dots in a domain name and could you provide a sample?
thx. (1 Reply)