Search Results

Search: Posts Made By: Blytsplyk
12,340
Posted By Blytsplyk
According to the useless use of cat web page that...
According to the useless use of cat web page that you refer to:

"Briefly, here's the collected wisdom on using cat: The purpose of cat is to concatenate (or "catenate") files. If it's only one...
4,694
Posted By Blytsplyk
echo " 1" | awk '{print $1}' awk...
echo " 1" | awk '{print $1}'

awk automatically strips the leading spaces when determining arguments.
12,340
Posted By Blytsplyk
This is your version, cleaned up so it works,...
This is your version, cleaned up so it works, along with test results (test file shown below).
cat test | awk -F"+" '
{
if ( $0 ~ /^$/ )
{
}
else
{
if ( $0 ~ /^[0-9+-]+$/...
3,448
Posted By Blytsplyk
Technically, scp does create directories if you...
Technically, scp does create directories if you specify the -r option but that means you need to copy the entire directory and not just a single file:

-r Recursively copy entire...
2,141
Posted By Blytsplyk
Since you are using cron and running the script...
Since you are using cron and running the script every 30 minutes, if you don't mind keeping an extra copy of your log file, you can do this instead. The cp is necessary to ensure that your next run...
3,487
Posted By Blytsplyk
find ${StartingDir} -name "*.txt" | grep -e...
find ${StartingDir} -name "*.txt" | grep -e "/DOC/" -e "/DOCS/" |
while read FullPath
do
mv ${FullPath} ${FullPath}Old
done
2,739
Posted By Blytsplyk
The problem is that you are not eliminating the...
The problem is that you are not eliminating the heading printed by the df command.

Execution yields:
df -k /home | grep % | awk '{print $5}' | sed 's/%//g'
Use
1

Change:
df -k /home | grep...
Showing results 1 to 7 of 7

 
All times are GMT -4. The time now is 12:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy