Tags » Shell Script

concatenate variable shell script

VAR=abc; echo ${VAR}def

for i in {1..5}; do echo x${i}x; done
Shell Script

script to recalculate vmware disk size

#!/bin/bash
# Recalculate vmware thin disk size

# Creates zero-block file in all free disk space 
for i in $(df | grep '^/dev/' | awk '{print $6}'); do
  if [ $i == '/' ];then
    echo 'creating a file of blocks zeroed in:' ${i}zerofile
    dd if=/dev/zero of=${i}zerofile bs=4096; rm -f ${i}zerofile
  else
    echo 'creating a file of blocks zeroed in:' $i/zerofile
    dd if=/dev/zero of=$i/zerofile bs=4096; rm -f $i/zerofile
  fi
done
… 18 more words
Shell Script

CPU, Memory Usage by Apache

APACHE PROCESSES THAT CPU OR MEMORY IS LARGER THAN 0

ps -A --sort -rss -o pid,comm,pmem,pcpu,lstart | grep httpd | awk '($3>0) || ($4>0)'

TOTAL CPU USED BY THE APACHE PROCESS… 46 more words

Shell Script

Shell Scripting: My Story, My Post-Install - Part 3

Where I work we have very few Red Hat servers, so there hasn’t been a need, so far, to deploy a Red Hat Satellite server to assist with deploying servers. 1,501 more words

Linux

Bump version with PlistBuddy

Either you are an iOS, macOS developer or developing something in Apple ecosystem, you must be familiar with one file called Info.plist. At some point in development, for sure you want to release a new version of your app and increase that version number. 1,431 more words

IT

Shell Script to Detect If the IP Address Is Googlebot

Recently I wanted to check if the IPs ( I had around 45) belonged to google bot. One option was to run host <ip> and… 110 more words

Linux

Shell Scripting: My Story, My Post-Install – Part 2

One thing I figure I should post is my app script referenced in the last post. This is what I use to install my favorite applications that is referenced in my post-install script for Fedora based distros. 187 more words

Linux