(echo step 1 && sleep 5 && echo step 2 ) | tee /tmp/a.log
res=$(cat /tmp/a.log)
echo $res
step 1 step 2
docker container prune -f
и docker container rm <имя>
CONTAINER='имя'
docker stop $CONTAINER
ID=$(docker container ls -a| grep $CONTAINER | awk '{print $1}')
docker rm $ID
window.addEventListener('load', function() {
navigator.serviceWorker.register('/sw.js');
});
Video link selected: https://www.tiktok.com/@egorkreed/video/678***************5
Video link selected: https://www.tiktok.com/@egorkreed/video/678***************7
Video link selected: https://www.tiktok.com/@egorkreed/video/678***************4
...
$d = 'eclipse'; get-childitem -path $d -attributes directory | foreach-object { $target = $_.FullName; & echo icacls $target /restore acl /t /c }
echo
уберите и $d
сделайте = 'D:\Project'
+ " 2>&1"
stdin.println("c:\\Users\\Serguei\\echoargstostderr.cmd " + serialNumber + " "
+ keyName + " " + formattedDate + " 2>&1");
StringBuffer processOutput = new StringBuffer();
while ((line = stdoutBufferedReader.readLine()) != null) {
processOutput.append(line);
}
StringBuffer processError = new StringBuffer();
while ((line = stderrBufferedReader.readLine()) != null) {
processError.append(line);
}
System.err.println("OUTPUT:" + processOutput.toString());
System.err.println("ERROR :" + processError.toString());
int returnCode = process.waitFor();
String code = Integer.toString(returnCode);
src\main\resources\application.properties
?Properties properties = new Properties();
InputStream input = null;
try {
input = <имя вашего класса>.class.getClassLoader()
.getResourceAsStream("application.properties");
properties .load(input);
System.err.println(properties .getProperty("spring.h2.console.enabled"));
sh -c "echo \"'A' = 'B'\" | tee /dev/null"
'A' = 'B'
sh -c "echo ''A' = 'B'' | tee /dev/null"
A = B
/tmp/a.txt
a A
b B
c C
while read s d; do echo "$s" "$d" ; done </tmp/a.txt
a A
b B
c C
/tmp/a.txt
a
b
c
while read s ; do
d=$(echo $s|sed's|^.*/||')
echo "$s" "$d" ;
done </tmp/a.txt
class waittest:
def __init__(self, locator1, locator2, attr, value):
self._locator1 = locator1
self._locator2 = locator2
self._attribute = attr
self._attribute_value = value
def __call__(self, driver):
element1 = driver.find_element_by_xpath(self._locator1)
# опущена проверка что element1 хороший
element2 = element1.find_element_by_xpath(self._locator2)
if element2.get_attribute(self._attribute) == self._attribute_value:
return element2
else:
return None
driver = webdriver.Firefox()
driver.get('http://www.ubuntu.com/')
try:
element = WebDriverWait(driver, 10).until(
waittest('//*[@id="navigation"]/div/div/div','a[@href="/"]', 'class', 'p-navigation__link')
)
if element != None:
print element.get_attribute('innerHTML')
except TimeoutException:
pass
driver.close()
driver.quit()
transform.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:uuid="java.util.UUID" version="2.0" exclude-result-prefixes="uuid">
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>
<xsl:template match="/">
<xsl:for-each select="//student">
<xsl:copy-of select="."/>
<output>
<xsl:variable name="random" select="uuid:randomUUID()"/>
<xsl:value-of select="$random"/>
</output>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
example.xml
<?xml version="1.0"?>
<class>
<student no="1">
<name>Linus</name>
</student>
<student no="2">
<name>Stallman</name>
</student>
</class>
java -cp target\xslt-0.0.1-SNAPSHOT.jar example.App example.xml transform.xsl output.xml
cat output.xml
<?xml version="1.0" encoding="utf-8"?><student no="1">
<name>Linus</name>
</student><output>2f5ed0c2-1b90-45ad-9445-42334d62690f</output><student no="2"
>
<name>Stallman</name>
</student><output>f4224811-6795-41ee-b4ab-5cb013330aed</output>
java -jar target\lib\Saxon-HE-9.9.1-6.jar -repeat:1 -o:output.xml -s:example.xml -xsl:transform.xsl
Static error in {uuid:randomUUID()} in expression in xsl:variable/@select on line
8 column 65 of transform.xsl:
XPST0017: Cannot find a 0-argument function named Q{java.util.UUID}randomUUID(). Reflexive calls to Java methods are not available under Saxon-HE
Errors were reported during stylesheet compilation
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
1
а не l
) но помоему удобнее tr
так что самые новые в конце а не вначале (ну и tail
вместо head
cp -P /tmp/a /tmp/b.xml^M
/tmp/b.xml^M
\r
sed -i 's|\r||g' a.sh