extended code to advanced input functionality

This commit is contained in:
hello 2025-02-08 12:16:29 +05:30
parent bb32f2abc5
commit 58cf91a06d
14 changed files with 40 additions and 0 deletions

View File

@ -0,0 +1,23 @@
#include <stdio.h>
#include <pthread.h>
#include <semaphore.h>
#include <sys/semaphore.h>
sem_t my_semaphore;
int main(){
sem_init(&my_semaphore, 0, 5);
int sem_val;
sem_getvalue(&my_semaphore, &sem_val);
printf("Semaphore value after extra posts: %d\n", sem_val);
sem_post(&my_semaphore);
sem_post(&my_semaphore);
sem_post(&my_semaphore);
sem_getvalue(&my_semaphore, &sem_val);
printf("Semaphore value after extra posts: %d\n", sem_val);
sem_destroy(&my_semaphore);
return 0;
}

View File

View File

View File

View File

View File

View File

View File

@ -0,0 +1,17 @@
#!/bin/bash
folder="$@"
for j in $folder
do
echo "Checking $j"
x=`find "$j" -type f -iname "[!aeiou]*"`
for i in $x
do
echo "$i"
done
done
# This script takes a folder name as a CLI argument and then lists all files that do not begin with a vowel (in filename)

View File

View File

View File

View File

View File

View File