Skip to content
Snippets Groups Projects
Commit 641cf013 authored by Peter Gerwinski's avatar Peter Gerwinski
Browse files

Screenshots und Beispiele 19.4.2024

parent 73c19f3f
No related branches found
Tags
No related merge requests found
Showing
with 171 additions and 0 deletions
echo "Hello, world!"
#include <stdio.h>
int main (void)
{
char buffer[100];
fgets (buffer, 100, stdin);
printf ("Hallo, %s!\n", buffer);
return 0;
}
#include <stdio.h>
int main (void)
{
char buffer[100];
fgets (buffer, 100, stdin);
int i = 0;
while (i < 100 && buffer[i] != '\n')
i++;
if (i < 100)
buffer[i] = 0;
printf ("Hallo, %s!\n", buffer);
return 0;
}
#include <stdio.h>
int main (int argc, char **argv)
{
printf ("argc = %d\n", argc);
for (int i = 0; i < argc; i++)
printf ("argv[%d] = \"%s\"\n", i, argv[i]);
char buffer[100];
fgets (buffer, 100, stdin);
int i = 0;
while (i < 100 && buffer[i] != '\n')
i++;
if (i < 100)
buffer[i] = 0;
printf ("Hallo, %s!\n", buffer);
return 0;
}
/*/true
/usr/bin/gcc -Wall -O "$0" && ./a.out
exit 0
*/
#include <stdio.h>
int main (void)
{
printf ("Hello, world!\n");
return 0;
}
echo "SCHLIMME DINGE"
/usr/bin/ls "$@"
cassini/home/peter/bo/2024ss/es/20240419> ls -l ls
SCHLIMME DINGE
-rwxr-xr-x 1 peter peter 39 19. Apr 13:37 ls
cassini/home/peter/bo/2024ss/es/20240419> chmod -x ls
cassini/home/peter/bo/2024ss/es/20240419> ls -l ls
-rw-r--r-- 1 peter peter 39 19. Apr 13:37 ls
cassini/home/peter/bo/2024ss/es/20240419> chmod +x ls
cassini/home/peter/bo/2024ss/es/20240419> ls -l ls
SCHLIMME DINGE
-rwxr-xr-x 1 peter peter 39 19. Apr 13:37 ls
cassini/home/peter/bo/2024ss/es/20240419>
cassini/home/peter/bo/2024ss/es/20240419> chmod 750 ls
cassini/home/peter/bo/2024ss/es/20240419> ls -l ls
SCHLIMME DINGE
-rwxr-x--- 1 peter peter 39 19. Apr 13:37 ls
cassini/home/peter/bo/2024ss/es/20240419> chmod 640 ls
cassini/home/peter/bo/2024ss/es/20240419> ls -l ls
-rw-r----- 1 peter peter 39 19. Apr 13:37 ls
cassini/home/peter/bo/2024ss/es/20240419> chmod 755 ls
cassini/home/peter/bo/2024ss/es/20240419> ls -l ls
SCHLIMME DINGE
-rwxr-xr-x 1 peter peter 39 19. Apr 13:37 ls
cassini/home/peter/bo/2024ss/es/20240419>
cassini/home/peter/bo/2024ss/es/20240419> cat hello-01.sh
echo "Hello, world!"
cassini/home/peter/bo/2024ss/es/20240419> chmod +x hello-01.sh
cassini/home/peter/bo/2024ss/es/20240419> ls -l hello-01.sh
SCHLIMME DINGE
-rwxr-xr-x 1 peter peter 21 19. Apr 14:13 hello-01.sh
cassini/home/peter/bo/2024ss/es/20240419> ./hello-01.sh
Hello, world!
cassini/home/peter/bo/2024ss/es/20240419> echo $PATH
.:/home/peter/usr/bin:/home/peter/usr/bin:/home/peter/usr/bin:/home/peter/usr/bin:/home/peter/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
cassini/home/peter/bo/2024ss/es/20240419> hel
hello-01.sh help helpztags
cassini/home/peter/bo/2024ss/es/20240419> hello-01.sh
Hello, world!
cassini/home/peter/bo/2024ss/es/20240419>
#!./hello-04
Peter
cassini/home/peter/bo/2024ss/es/20240419> ls -l test-02.bc
SCHLIMME DINGE
-rwxr-xr-x 1 peter peter 25 19. Apr 14:17 test-02.bc
cassini/home/peter/bo/2024ss/es/20240419> cat test-02.bc
#!/usr/bin/bc
2 + 2
quit
cassini/home/peter/bo/2024ss/es/20240419> ./test-02.bc
bc 1.07.1
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
4
cassini/home/peter/bo/2024ss/es/20240419>
#include <stdio.h>
int main (int argc, char **argv)
{
printf ("argc = %d\n", argc);
for (int i = 0; i < argc; i++)
printf ("argv[%d] = \"%s\"\n", i, argv[i]);
char buffer[100];
fgets (buffer, 100, stdin);
int i = 0;
while (i < 100 && buffer[i] != '\n')
i++;
if (i < 100)
buffer[i] = 0;
printf ("Hallo, %s!\n", buffer);
return 0;
}
cassini/home/peter/bo/2024ss/es/20240419> gcc -Wall -O hello-04.c -o hello-04
cassini/home/peter/bo/2024ss/es/20240419> ./hello-04
argc = 1
argv[0] = "./hello-04"
Peter
Hallo, Peter!
cassini/home/peter/bo/2024ss/es/20240419>
cassini/home/peter/bo/2024ss/es/20240419> echo mv -i hello-0{6,5}.c
mv -i hello-06.c hello-05.c
cassini/home/peter/bo/2024ss/es/20240419> mv -i hello-0{6,5}.c
cassini/home/peter/bo/2024ss/es/20240419> cat hello-05.c
/*/true
/usr/bin/gcc -Wall -O "$0" && ./a.out
exit 0
*/
#include <stdio.h>
int main (void)
{
printf ("Hello, world!\n");
return 0;
}
cassini/home/peter/bo/2024ss/es/20240419> ls -l hello-05.c
SCHLIMME DINGE
-rwxr-xr-x 1 peter peter 141 27. Mär 2023 hello-05.c
cassini/home/peter/bo/2024ss/es/20240419> ./hello-05.c
Hello, world!
cassini/home/peter/bo/2024ss/es/20240419>
2 + 2
quit
#!/usr/bin/bc
2 + 2
quit
#!/usr/bin/python
print ("Hello, world!")
#!/usr/bin/python3
print ("Hello, world!")
Dies ist ein Test.
Dies ist ein Test.
Dies ist ein Test.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment