9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All,
I have a file of ip addresses called activeips.txt
What I'm trying to do is run a simple bash script that has a loop in it. The loop is a cat of the IP addresses in the file.
The goal is to run 2 nmap commands to give me outputs where each address in the list has an OS... (11 Replies)
Discussion started by: Dirk_Pitt
11 Replies
2. Shell Programming and Scripting
Hello,
I am new to Linux and studying to become a Unix System Admin. I am taking a course in which I was practicing creating a bash script to ping a particular IP address. The script can be found below:
#/bin/bash
echo "Enter the IP address"
read ip
if
then
ping -c 1 $ip
if ;... (3 Replies)
Discussion started by: shah9250
3 Replies
3. Shell Programming and Scripting
same script:
1- i am using grep to find a string called: tinker panic 0 in a file /etc/ntp.conf
if the string is not there, i want to add the strings in /etc/ntp.conf file in the first line of the file. if not do nothing or exit.
2- also i want to add # in front of the following lines in... (0 Replies)
Discussion started by: lamoul
0 Replies
4. Shell Programming and Scripting
have a script that calls child scripts depending on conditions. All of the child scripts source in a common file that contains shared functions.
At the moment each script has to source this file itself, is there a way for the master script to automagically source the file for them?
For... (3 Replies)
Discussion started by: redman
3 Replies
5. Shell Programming and Scripting
Dear All,
I have a question that's been difficult to get an answer to.
I often write command line loops, e.g. find files, print name, grep for term, apply sed, etc
I use both zsh and bash.
When I write a loop e.g.
for line in `more myfile.txt`
> do
> echo $line
> done
but... (2 Replies)
Discussion started by: JohnK1
2 Replies
6. Shell Programming and Scripting
Hey,
So I've run into a problem, due to my limited knowledge of Bash scripting.
Basically I've got a long script and I want to understand it before I even try and edit it. As long as I don't understand the script, I will not bother editing it.
Anyway, the following variable confuses me... (5 Replies)
Discussion started by: abciscool
5 Replies
7. Homework & Coursework Questions
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:
i have to do this but i am confused,
Create a file containing the bash functions which perform the... (1 Reply)
Discussion started by: CRAZYLITTLELOU
1 Replies
8. Shell Programming and Scripting
Hi,
can anyone help me with my scrip please. I wanted do following tasks:
1. List all the directory
2. A STDIN to ask user to enter a directory name from listed directories
3. command to check if the directory exists( or a command to validate if the user entered a valid directory name)... (3 Replies)
Discussion started by: eminjan
3 Replies
9. Shell Programming and Scripting
hi all
i'm trying to get a script working upon connection with pppd
According to docu this happens ina clean environment with a couple of variables set, namely $1,$2,...
To be able to execute the statements i included a path statement but i think i'm running into trouble with the variables -... (6 Replies)
Discussion started by: jimjones
6 Replies