School Commit Init

This commit is contained in:
2024-08-31 12:07:21 +03:00
commit 0b130ee18c
2801 changed files with 4720552 additions and 0 deletions
@@ -0,0 +1 @@
grep -E "[01]{3,}00\b" a.txt
@@ -0,0 +1 @@
Nothing, the program will wait for another process to open the file in read mode
@@ -0,0 +1 @@
The process will appear in the list with all the processes, as a zombie
@@ -0,0 +1,9 @@
int n=0;
pthread_mutex_t m;
void* f(void* p){
phread_mutex_lock(&m);
n++:
pthread_mutex_unlock(&m);
return NULL;
}
@@ -0,0 +1 @@
CBA
@@ -0,0 +1 @@
sed -E "s/([13579])([aeiou])/\2\1/g" a.txt
@@ -0,0 +1 @@
cat a.txt |sed -E "s/ /\n/g" | sort | uniq
@@ -0,0 +1 @@
ps -ef | awk -F" " '{print $1}' | grep -v "UID" | sort | uniq -c
@@ -0,0 +1,5 @@
#!/bin/bash
a=`find | tail -n+2 | grep -c ".txt"`
b=`find | tail -n+2 | grep -c ""`
echo $a / $b
@@ -0,0 +1 @@
6
@@ -0,0 +1 @@
p->c1->c2->c3
@@ -0,0 +1 @@
A,B,C in any order only once
@@ -0,0 +1 @@
It will write as much as it can, it will return the number of bits written.
@@ -0,0 +1,3 @@
1-0 22-3 1-0
2-4 4-2
5-6
@@ -0,0 +1,9 @@
#include <sys/types.h>
#include <unistd.h>
int main(){
char* s[3]={"A","B","C"};
for(int i=0;i<3;i++){
if(fork()!=0){
execl("/bin/echo","/bin/echo",s[i],NULL);
}
}}