If you need to enter into the command prompt of a running Docker container:
sudo docker ps
And then enter the container by name or ID
sudo docker exec -i -t nginx-test /bin/bash
or
sudo docker exec -i -t e7a5s8dd2s3s4-test /bin/sh
If you need to enter into the command prompt of a running Docker container:
sudo docker ps
And then enter the container by name or ID
sudo docker exec -i -t nginx-test /bin/bash
or
sudo docker exec -i -t e7a5s8dd2s3s4-test /bin/sh
root@rp:~# su - www-data -s /bin/bash www-data@rp:~$ cd /var/lib/phpfina www-data@rp:/var/lib/phpfina$ vi test
exec 6<>/dev/tcp/127.0.0.1/443 || echo "Port is not open" exec 6>&- # close output connection exec 6<&- # close input connection
exec 6<>/dev/tcp/127.0.0.1/443 echo -e "GET / HTTP/1.0\n" >&6 cat <&6
#!/bin/bash for i in {01..31} do echo "Day: $i" done
#!/bin/bash for (( i=1; i<=31; i++ )) do i=$(("0"$i)) echo "Day: $i" done
#!/bin/bash for (( i=1; i<=31; i++ )) do i=$(printf "%02d" $i) echo "Day: $i" done
#!/bin/bash for i in `seq -f ‘%02g’ 1 31` do echo "Day: $i" done
#!/bin/sh FILENAME="status.txt" LINENUM=0 REGEX="^(CLIENT_LIST)(.+)" while read SINGLELINE do LINENUM=$((LINENUM+1)) if [[ $SINGLELINE =~ $REGEX ]]; then NUM_CLIENT=$((NUM_CLIENT+1)) echo "Match CLIENT_LIST: $LINENUM" else echo "No match: $LINENUM" fi done < "$FILENAME"
#!/opt/bin/bash FILENAME="status.txt" LINENUM=0 REGEX="^(CLIENT_LIST)(.+)" while read SINGLELINE do LINENUM=$((LINENUM+1)) if [[ $SINGLELINE =~ $REGEX ]]; then NUM_CLIENT=$((NUM_CLIENT+1)) echo "Match CLIENT_LIST: $LINENUM" else echo "No match: $LINENUM" fi done < "$FILENAME"