unix

shell script to create folder daily with time-stamp and push time-stamp generated logs

北慕城南 提交于 2020-12-28 21:11:57
问题 I have a cron job which runs every 30 minutes to generate log files with time-stamp like this: test20130215100531.log, test20130215102031.log I would like to create one folder daily with date time-stamp and push log files in to respective date folder when generated. I need to achieve this on AIX server with bash. 回答1: Maybe you are looking for a script like this: #!/bin/bash shopt -s nullglob # This line is so that it does not complain when no logfiles are found for filename in test*.log; do

shell script to create folder daily with time-stamp and push time-stamp generated logs

陌路散爱 提交于 2020-12-28 21:09:37
问题 I have a cron job which runs every 30 minutes to generate log files with time-stamp like this: test20130215100531.log, test20130215102031.log I would like to create one folder daily with date time-stamp and push log files in to respective date folder when generated. I need to achieve this on AIX server with bash. 回答1: Maybe you are looking for a script like this: #!/bin/bash shopt -s nullglob # This line is so that it does not complain when no logfiles are found for filename in test*.log; do

shell script to create folder daily with time-stamp and push time-stamp generated logs

Deadly 提交于 2020-12-28 21:08:30
问题 I have a cron job which runs every 30 minutes to generate log files with time-stamp like this: test20130215100531.log, test20130215102031.log I would like to create one folder daily with date time-stamp and push log files in to respective date folder when generated. I need to achieve this on AIX server with bash. 回答1: Maybe you are looking for a script like this: #!/bin/bash shopt -s nullglob # This line is so that it does not complain when no logfiles are found for filename in test*.log; do

shell script to create folder daily with time-stamp and push time-stamp generated logs

北慕城南 提交于 2020-12-28 21:06:34
问题 I have a cron job which runs every 30 minutes to generate log files with time-stamp like this: test20130215100531.log, test20130215102031.log I would like to create one folder daily with date time-stamp and push log files in to respective date folder when generated. I need to achieve this on AIX server with bash. 回答1: Maybe you are looking for a script like this: #!/bin/bash shopt -s nullglob # This line is so that it does not complain when no logfiles are found for filename in test*.log; do

Python3.7: error while loading shared libraries: libpython3.7m.so.1.0

自闭症网瘾萝莉.ら 提交于 2020-12-28 18:28:26
问题 I have two versions Python-2.7 , Python-3.5 which I was able to access with python(pip) and python3(pip3) command respectively. Then I have installed an another version of python (i.e 3.7.5) . I have used these commands to install it. sudo apt-get install -y make build-essential libssl-dev zlib1g-dev libbz2-dev \ libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \ xz-utils tk-dev libffi-dev liblzma-dev wget https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz

Download Folder including Subfolder via wget from Dropbox link to Unix Server

ぐ巨炮叔叔 提交于 2020-12-28 14:56:28
问题 I have a dropbox link like https://www.dropbox.com/sh/w4366ttcz6/AAB4kSz3adZ which opens the ususal dropbox site with folders and files. Is there any chance to download the complete content (tar or directly as sync) to a unix machine using wget? I have seen some posts here where single files were downloaded but could not find any answer to this. There is an api from Dropbox but that does not work on my server due to the 64 bit issue on my server and http://www.dropboxwiki.com/dropbox-addons

Download Folder including Subfolder via wget from Dropbox link to Unix Server

痴心易碎 提交于 2020-12-28 14:52:56
问题 I have a dropbox link like https://www.dropbox.com/sh/w4366ttcz6/AAB4kSz3adZ which opens the ususal dropbox site with folders and files. Is there any chance to download the complete content (tar or directly as sync) to a unix machine using wget? I have seen some posts here where single files were downloaded but could not find any answer to this. There is an api from Dropbox but that does not work on my server due to the 64 bit issue on my server and http://www.dropboxwiki.com/dropbox-addons

sed replace xml tag

独自空忆成欢 提交于 2020-12-26 23:26:48
问题 I want to replace value inside a tag in an xml file using sed. <version> xxxx-SS </version> I want to replace xxxx-SS with some shell variable $ver . The final result should be <version>$ver</version> The sed command should also quit after replacing the first instance. So far I have been able to only append to the xxxx-SS and not been able to quit after the first match. sed 's#\(<version>\)*\(</version>\)#\1'$ver'\2#g' test.xml This only appends the value between -SNAPSHOT tag.Basically makes

sed replace xml tag

亡梦爱人 提交于 2020-12-26 23:00:15
问题 I want to replace value inside a tag in an xml file using sed. <version> xxxx-SS </version> I want to replace xxxx-SS with some shell variable $ver . The final result should be <version>$ver</version> The sed command should also quit after replacing the first instance. So far I have been able to only append to the xxxx-SS and not been able to quit after the first match. sed 's#\(<version>\)*\(</version>\)#\1'$ver'\2#g' test.xml This only appends the value between -SNAPSHOT tag.Basically makes

sed replace xml tag

試著忘記壹切 提交于 2020-12-26 22:59:33
问题 I want to replace value inside a tag in an xml file using sed. <version> xxxx-SS </version> I want to replace xxxx-SS with some shell variable $ver . The final result should be <version>$ver</version> The sed command should also quit after replacing the first instance. So far I have been able to only append to the xxxx-SS and not been able to quit after the first match. sed 's#\(<version>\)*\(</version>\)#\1'$ver'\2#g' test.xml This only appends the value between -SNAPSHOT tag.Basically makes