There are multiple way to remove spaces,
# Variable a contains the following
a="Hello World !"
echo
echo ${a// /}
Sed
echo $a | sed "s/\ //g"
tr
tr -d ' ' <<<"$a"
or
echo $a | tr -d ' '
Returned output
HelloWorld!
There are multiple way to remove spaces,
# Variable a contains the following
a="Hello World !"
echo
echo ${a// /}
Sed
echo $a | sed "s/\ //g"
tr
tr -d ' ' <<<"$a"
or
echo $a | tr -d ' '
Returned output
HelloWorld!
The -h option allows you to connect to a remote host.
-h, –host=name Connect to host.
mysql -u root -p -h hostname
Create a file “list.txt” that contains all the URLs you want to download and launch the following command
for i in cat list.txt
; do wget ${i} && sleep $(( ( RANDOM % 120 ) +1 )) ; done
It’ll now run and after each link will wait a random amount of time up to 120 seconds before downloading the next link. Change the number as needed.
Change the 10 to however many seconds you need or want.
echo $(( ( RANDOM % 10 ) +1 ))
Example output
bob@localhost:~$ echo $(( ( RANDOM % 10 ) +1 )) 10 bob@localhost:~$ echo $(( ( RANDOM % 10 ) +1 )) 2 bob@localhost:~$ echo $(( ( RANDOM % 10 ) +1 )) 9 bob@localhost:~$
Sleep timer
sleep $(( ( RANDOM % 10 ) +1 ))
Try installing software-properties-kde and get
The following packages have unmet dependencies: software-properties-kde : Depends: python3-software-properties (= 0.96.24.32.11) but 1.8.8 is to be installed E: Unable to correct problems, you have held broken packages.
Try to install python3 from the bionic from bionic-updates
sudo apt install -t bionic-updates python3-software-properties
Install software-properties-kde
sudo apt install software-properties-kde
If it fails try force installing it
sudo dpkg -i --force-overwrite /var/cache/apt/archives/software-properties-kde_0.96.24.32.11_all.deb
Install Kubuntu desktop
sudo apt install kubuntu-desktop
Install dhcp server software
sudo apt install isc-dhcp-server
Edit the following config file and set the networking interface it should use. In this case enp60s0
sudo vi /etc/default/isc-dhcp-server
Example line to change
INTERFACESv4="enp60s0"
Now edit the dhcpd.con file
sudo vi /etc/dhcp/dhcpd.conf
Add the following in. Change the addresses and settings as needed.
subnet 192.168.47.0 netmask 255.255.255.0 { range 192.168.47.26 192.168.47.30; option domain-name-servers ns1.internal.example.org; option domain-name "internal.example.org"; option subnet-mask 255.255.255.0; option routers 192.168.47.1; option broadcast-address 192.168.47.255; default-lease-time 600; max-lease-time 7200; }
Set a static ip on the computer that’ll be acting as the dhcp server. You can set it as the gateway if it is the gateway.
Allow dhcp through the firewall
sudo ufw allow 67/udp sudo ufw reload
Restart the service and connect a client.
sudo systemctl restart isc-dhcp-server
You can look at dhcp leases with the following command
tail -f /var/lib/dhcp/dhcpd.leases
Install iperf
sudo yum install iperf3
Launch server with
iperf3 -s
If you want you can have it bind on a certain interface which can be useful in some causes if you have multiple IP addresses on the system. The IP address is the local address of the machine.
iperf3 -s -B 192.168.1.1
Note you may need to disable the firewall to allow access from the client
sudo systemctl stop firewalls
From the client computer install iperf and run it.
iperf3 -c 192.168.1.1
Boot up and create your raid array
Boot into Clonezilla and get to command line :cry: unfortunately you can’t clone from disk to raid in clonezilla interface, however we can do it from the command Line!
Basic steps are as follows. Replace raidarray with the name of your raid array.
sudo apt full-upgrade
When prompted type in the following to continue the upgrade
Yes, do as I say!
You may need to remove libsnmp-base if you have package issues.
sudo apt-get remove libsnmp-base
Disable the service from starting on system boot
systemctl disable NetworkManager
Stop the service from running
systemctl stop NetworkManager
And if you want to remove it from the system.
yum remove NetworkManager
Refer to this post if you need to set a static IP Address