Skip to content
IP-Life.net

IP-Life.net

The Adventures of a Network Security Engineer

Menu

  • About IP-Life.net
  • BGP Information
  • Contact
  • Technical Resources

bash

Loading Environment Variables in a Cron Job

Introduction You may sometimes need to run a script using cron which has dependencies on environment variables. Because cron runs non-interactively it will require a way to load those environment variables in at run time. Solution There are multiple ways

David Messenger 14th March 202214th March 2022 Cron 1 Comment Read more

Useful bash Operations

Introduction A list of solutions for common problems working in a bash shell. Will update as I find them. Find two words existing on the same line https://stackoverflow.com/questions/6480687/grep-for-2-words-existing-on-the-same-line To grep for 2 words existing on the same line, simply do:

David Messenger 18th July 20188th December 2020 Linux No Comments Read more

Linux Bash Printing Columns using AWK

Introduction If you ever had a requirement to parse huge firewall logs looking for something specific then trust me you will likely need to use awk possibly in combination with other commands such as grep, sort and uniq. Solution Get

David Messenger 13th December 201715th December 2017 Linux No Comments Read more

Find and Change All Permissions Recursively

Find and Change All Permissions Recursively

Introduction A couple of pretty simple bash commands for finding and changing permissions on all files and directories recursively. Obviously you need to understand what permissions you want in advance so check the man pages and online but for when

David Messenger 15th October 2016 Linux No Comments Read more

Bulk Replace Spaces in File Names

Introduction This is the easiest way I’ve found to replace spaces in file names with another character for example underscore. Solution At a bash prompt, use rename: find -name “* *” -type d | rename ‘s/ /_/g’ # do the

David Messenger 22nd August 2016 Linux No Comments Read more

Bulk Rename File Extensions e.g. .JPG to .jpg

Introduction If you’ve ever needed to rename multiple files which had a different file extension then this is what you need Solution Open the terminal. Change directory to the parent directory of folder1 using the cd command. cd /path/to/parent/directory/of/folder1/ Run

David Messenger 21st August 2016 Linux No Comments Read more

Recent Posts

  • Panorama Push Failure
  • Loading Environment Variables in a Cron Job
  • Advertising a non-existent route to BGP in PAN-OS
  • Network Design – VDSL
  • NetBox Automation
  • Testing DNS Glue Records
  • Updating Netfilter Firewall Rules
  • Palo Alto Useful Links and Commands
  • Useful Python Snippets
  • Find & Replace Multiple Files

Categories

Tags

Active Directory Apache ASA bash Cacti CentOS Certificates chown Cisco CRON Drivers EMC Excel Firewall FreeBSD grep IPv6 Isilon Juniper Linux Microsoft Mint Netscreen Networking Network Monitoring Notepad++ Palo Alto PaloAltoNetworks Python RANCID Regex Routing Secure Copy Security Sophos UTM9 SSH SSL Text editors TFTP Ubuntu vim VMware Windows Wordpress yaml

Archives

  • October 2024
  • March 2022
  • February 2022
  • January 2022
  • November 2021
  • April 2021
  • February 2021
  • August 2020
  • June 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • June 2019
  • May 2019
  • January 2019
  • December 2018
  • October 2018
  • July 2018
  • May 2018
  • April 2018
  • February 2018
  • January 2018
  • December 2017
  • August 2017
  • July 2017
  • June 2017
  • May 2017
  • April 2017
  • March 2017
  • February 2017
  • January 2017
  • November 2016
  • October 2016
  • September 2016
  • August 2016
  • July 2016
  • June 2016
  • May 2016
  • April 2016
  • March 2016
  • February 2016
  • January 2016
  • December 2015
  • November 2015
  • October 2015
  • September 2015
  • August 2015
  • July 2015
  • June 2015
  • May 2015
  • April 2015
  • March 2015
  • February 2015
IPv6 Certification Badge for davidkmessenger

Copyright © 2025 IP-Life.net. All rights reserved. Theme Spacious by ThemeGrill. Powered by: WordPress.