mm this is my personal script
i have create file with 1000 line with this format:
ip/port like 192.168.1.1/1055, let say ip.txt and create a core.sh file
main part of this project is when core.sh execute, it read ip and port from ip.txt and create 1000 files with this pattern:
I have three arrays which hold three elements each.
I have a fourth array which contains the names of those three arrays.
I'm having difficulty creating a nested loop that can loop through each array and echo their values.
script
#!/bin/ksh
# array of locations (usa, london, australia)... (1 Reply)
Hello,
I have created numerous variables called $mask1 $mask2... $maskN. I wish to echo these variables, below is the code for the two functions, the first creates the variables and the second echos them.
It is the second function which does not work. The line (i believe to be wrong) is in... (1 Reply)
Hi
I want to display "echo command value in loop" in single line. My requirement is to show the input file (test_1.txt) like the output file (test_2.txt) given below.
Input file :test_1.txt
a1|b1|4|5
a1|b1|42|9
a2|b2|32|25
a1|b1|2|5
a3|b3|4|8
a2|b2|14|6
Output file:test_2.txt... (2 Replies)
Bit of a weird one i suppose, i want to use an echo inside an echo... For example...
i have a script that i want to use to take users input and create another script. Inside this script it creates it also needs to use echos...
echo "echo "hello"" >$file
echo "echo "goodbye"" >$file
... (3 Replies)
one more question. I want to skip the first echo statement the first time the loop gets entered
while #keep prompting for more funds until selling price achieved
do
echo "You have inserted a total of ${total_inserted} cents. Please insert $total_remaining more cents"
echo... (1 Reply)
I have a record.txt it will update weekly, and it could be 2 lines or more ...
it just echo each line to the script
san jose,23.34%
tampa,2.15%
dallas,30.20%
seattle,44.29%
Unknown,16.72%
How do i write a shell script to give me a test.pl or bash file which contain
#!/home/perl... (8 Replies)
Hi, I am trying to make a script to manage log. I want to write the name of the .gz I moved and the date :
for i in `ls $replog/*.gz`
do
echo " $i "
`echo $i date +%d:%m:%Y`
`echo $datee `>> $replog/mrnet.log
mv $i /var/log/vieux-logs
done
I need to echo... (10 Replies)
I'm trying to echo the release version of some of our Linux servers. Typically I do these types of things by "catting" a text file with the host names, "ssh-ing" to the host and running my string.
This is what I've written
for i in `cat versions.txt` ; do echo $i ; ssh $i cat /etc/issue |... (5 Replies)
Currently using below script but echo it print the output in two line.
Input file all-vm-final-2.txt
CEALA08893 SDDC_SCUN DS_SIO_Workload_SAPUI_UAT_01 4
CEALA09546 SDDC_SCUN DS-SIO-PD5_Workload_UAT_SP1_Flash_07 4
CEALA09702 SDDC_SCUN DS-VSAN-RMP-WORKLOAD01 4
DEALA08762 SDDC_LDC... (3 Replies)
Hi, All:
I have one for ... loop code to generate a list of rename statement. However, echo the loop output on screen is OK. But store the echo output into a file is not working. So come here to seek help. My basic code is:
! /bin/ksh
echo > DAS_VetFed.txt
dir=/mydirectory
cd $dir
files=`ls... (6 Replies)
Discussion started by: duke0001
6 Replies
LEARN ABOUT DEBIAN
pydhcplib.ipv4
pydhcplib.ipv4(3) PYDHCPLIB pydhcplib.ipv4(3)NAME
pydhcplib.ipv4 - Type for IP addresses version 4
SYNOPSIS
from pydhcplib.type_ipv4 import ipv4
a = ipv4()
a = ipv4(string)
a = ipv4(strlist)
a = ipv4(int)
DESCRIPTION
The class pydhcplib.ipv4 is a type "IP address version 4". It's used for string processing like "192.168.0.4".
The class creation argument can be a string like "192.168.0.4".
The class creation argument can be a list of bytes like [192,168,0,4].
METHODS
The implemented methods in this class are mostly methods of comparison (= =, >, etc...)
else :
str() return data converted into a printable string.
list() return data converted into a list of bytes.
int() return data converted into an 4 bytes int.
EXAMPLES
Example program ipv4_example.py :
from pydhcplib.type_ipv4 import ipv4
address = ipv4()
address1 = ipv4("192.168.0.1")
address2 = ipv4("10.0.0.1")
address3 = ipv4([192,168,0,1])
print "a0 : ",address
print "a1 : ",address1
print "a2 : ",address2
print "a3 : ",address3
if address1 == address2 :
print "test 1 : ",address1, "==",address2
else :
print "test 1 : " ,address1, "!=",address2
if address1 == address3 :
print "test 2 : ", address1, "==",address3
else :
print "test 2 : ", address1, "!=",address3
SEE ALSO pydhcp(8), pydhcplib.hwmac(3), pydhcplib.ipv4(3), pydhcplib.strlist(3), pydhcplib.DhcpPacket(3), pydhcplib.DhcpBasicPacket(3), pydhc-
plib.DhcpNetwork(3), pydhcplib.DhcpClient(3), pydhcplib.DhcpRawClient(3), pydhcplib.DhcpDerver(3)BUGS
See http://pydhcplib.tuxfamily.org/ for more information.
AUTHOR
Mathieu Ignacio (mignacio[AT]april.org)
pydhcplib.ipv4(3)