One line infinite while loop
while true; do echo 'Hit CTRL+C to exit'; someCommand; someOtherCommand; sleep 1; done
alternative syntax
while :; do echo 'Hit CTRL+C to exit'; someCommand; someOtherCommand; sleep 1; done
while true; do echo 'Hit CTRL+C to exit'; someCommand; someOtherCommand; sleep 1; done
alternative syntax
while :; do echo 'Hit CTRL+C to exit'; someCommand; someOtherCommand; sleep 1; done
You can get a User’s User ID (UID), main Group ID (GID) and Supplementary Groups using the id command.
id useraccount
In the folder <Installation Path>/wp-includes/ there is a file called functions.php, inside this file there is a function called get_allowed_mime_types().
This function is in charge of defining an Array of mime types keyed by the file extension with a regex corresponding to those types.
So in order to add a new file-type to the white-list you just have to add a new line with the following format in the list:
'jpg|jpeg|jpe' => 'image/jpeg',
Where, on the left you define the extensions you want to be accepted separated by the vertical bar character (“|”) and on the right you give a file definition.
The following script will accept from the keyboard a filename, later it will read it and process it line by line.
In this example we will just number the lines, print them and count the total number of lines in the file.
#!/bin/sh echo Enter the Filename to process read filename exec<$filename lineNumber=0 while read line do lineNumber=`expr $lineNumber + 1`; echo $lineNumber - $line; done echo "Total Lines Number: $lineNumber";