shell script

How to automatically clean PHP session files left in the tmp directories of web accounts in an ISPConfig server environment

botond published March 2021, 03, Thu - 04:11 time
PHP sessions are global variables that transmit data stored during web visits across multiple pages, i.e., they are not lost when moving from one page to another. PHP accomplishes this by assigning unique IDs to visits (sessions) and creating files in the server-side file structure associated with those IDs in which it stores the data required for the session. The system places these files in a specific directory, usually tmp, which is normally deleted by the garbage collector after a specified time. However, the situation is sometimes not so obvious. This is because if the PHP environment on the server changes, the garbage collector may not be able to delete these obsolete, unnecessary session files. In this description, we will look at how we can use our own solution to ensure that these session files are deleted when the default cleaning system cannot remove them.

How to flexibly handle parameters in our shell scripts

botond published Jan. 2019, 09, 11:15 p.m. time
When programming, it is important that when we write a program that performs a certain task, our code should be prepared for several possibilities, variations and, if possible, parameterized - with which we can make its operation fine-tuned. This is no different for shell scripts. In today’s example, we’ll look at how we can flexibly handle the parameters we get in our scripts, making it easier to create programs that are easier for others to use.

Read, write, copy files metadata with ExifTool (page 3)

botond published 2019/06/15, Sat - 16:55 time
The exiftool command can be used to read or write metadata for different file formats from the command line, which can be especially useful when you need to process automated files in larger quantities. On this page, you can learn about a specific automation shell script that copies IPTC data from JPG files to EPS files.

Managing and Using Arrays in Shell Scripts (page 4)

botond published 2019. 03. 11., h - 17:11 time
During programming, it is often necessary to use arrays, which can be used to store several values ​​at once, which can then be processed automatically in cycles. This is no different for Shell scripts. In this four-page description, we’ll look at several examples of how we can use array variables in different situations in our Shell scripts. On this page, we will look at how to export arrays to the global namespace.

Managing and Using Arrays in Shell Scripts (page 3)

botond published 2019. 03. 11., h - 17:10 time
During programming, it is often necessary to use arrays, which can be used to store several values ​​at once, which can then be processed automatically in cycles. This is no different for Shell scripts. In this four-page description, we will look at several examples of how we can use array variables in different situations in our Shell scripts. On this page, we continue to use arrays to get acquainted with associative arrays.

Managing and Using Arrays in Shell Scripts (page 2)

botond published 2019. 03. 11., h - 17:09 time
During programming, it is often necessary to use arrays, which can be used to store several values ​​at once, which can then be processed automatically in cycles. This is no different for Shell scripts. In this four-page description, we will look at several examples of how we can use array variables in different situations in our Shell scripts. On this page, we continue to get acquainted with indexed arrays by using arrays in branches and functions.

Manage and use arrays in Shell scripts

botond published 2019. 03. 11., h - 17:08 time
During programming, it is often necessary to use arrays, which can be used to store several values ​​at once, which can then be processed automatically in cycles. This is no different for Shell scripts. In this four-page description, we’ll look at several examples of how we can use array variables in different situations in our Shell scripts. On this page, we’ll learn how to create indexed arrays, load and read data into arrays, and see how to use indexed arrays in loops.

Getting to Know the Whiptail Dialog Maker (page 2)

botond published 2018. 10. 22., h - 02:45 time
In this tutorial you will learn about whiptail, how to display various dialog boxes in our shell scripts, such as password prompts, menus, option lists, radio buttons, and progress panels to make our programs convenient for our users. (Page 2 of the description)

Getting to Know the Whiptail Dialogue Maker

botond published 2018. 10. 22., h - 02:44 time
In this tutorial, we will introduce you to whiptail, how to display various dialog boxes in our shell scripts, such as info boxes, message boxes, yes / no question boxes, text entry boxes and text boxes to help make our programs convenient for our users.