egrep "^1.*[02468]\>" file.txt | egrep "AA(AA)*" | tr -s "A" | cut -d " " -f 1
10102 AA
10125 A
13194 AAAAAA
13148 A
15792 AAAA
10123 AAA
20210 AAA
20122 AAAA
axxxy 20 Giuseppe Rosso
axxxxy 5 Anna Verde
axy 2 Giorgio Giallo
ay 10 Stefano Verde
az 15 Giulio Rosa
drwxr-xr-x 2 matteo staff 64 May 24 15:54 1bab.txt
-r--r---wx 1 matteo staff 0 May 24 15:39 678bxb.txt
-rw-rw--wx 1 matteo staff 0 May 24 15:40 678bxb543.txt
-rwxr-xr-x 1 matteo staff 33784 May 24 18:45 a.out
-rw-r--r-- 1 matteo staff 0 May 24 15:39 bab.txt
-rw-r--r-- 1 matteo staff 839 May 24 18:45 x.c
-rw-r--r-- 1 matteo staff 0 May 24 15:40 x.txt
drwxr-xr-x 2 matteo staff 64 May 24 15:40 y.txt
find . -type f -regextype posix-extended -regex "\.\/aXXX(XX)*b\.txt" -writable
-rw-rw-r-- 1 scanzio scanzio 0 gen 2 22:18 aaXXXb.txt
-rwxrwxr-x 1 scanzio scanzio 0 gen 2 22:17 aXXXb.txt
-rw-rw-r-- 1 scanzio scanzio 0 gen 2 22:17 aXXXXb.txt
-rw-rw-r-- 1 scanzio scanzio 0 gen 2 22:17 aXXXXXb.sh
-r--r--r-- 1 scanzio scanzio 0 gen 2 22:17 aXXXXXb.txt
drwxrwxr-x 2 scanzio scanzio 4096 gen 2 22:22 aXXXXXXb.txt
-rw-rw-r-- 1 scanzio scanzio 0 gen 2 22:23 aXXXXXXXb.txt
-rw-rw-r-- 1 scanzio scanzio 0 gen 2 22:22 aXXXXXXXXXb.txt
egrep -e "^H" in.txt | egrep -e "H[23][0-9]" | egrep -v "\-X$" | cut -d "-" -f1,3
H21-5.60-Stefano-XX
B23-2.34-Stefano-X
B22-4.50-Giulia-XX
H25-2.20-Gabriele-XX
H10-8.40-Apinda-X
H30-2.30-Gabriele-X
H30-2.40-Giulia-XX
.PHONY: A B C D E F G H I
E:
@echo -n "E"
B: E F
@echo -n "B"
C: G H
@echo -n "C"
G: I
@echo -n "G"
F:
@echo -n "F"
H:
@echo -n "H"
I:
@echo -n "I"
D:
@echo -n "D"
A: B C D
@echo -n "A"
CMD:
@echo "pippo" > file
@cat file | tr -s p | tr p v
CC = gcc
FLAGS = -Wall -g
LIB = -lm
.PHONY: clean distclean
mainVet.o: mainVet.c my.h
$(CC) $(FLAGS) -c mainVet.c $(LIB)
inVet.o: inVet.c my.h
$(CC) $(FLAGS) -c inVet.c $(LIB)
target: mainVet.o inVet.o
$(CC) $(FLAGS) -o myExe mainVet.o inVet.o $(LIB)
distclean: clean1 clean2
rm -f distclean
clean1: clean3
rm -f clean1
clean2:
rm -f clean2
clean3:
rm -f clean3 rm -f clean3b