Results for “print”
Small, practical examples. Search by task or narrow things down below.
Replace text with sed
Replace all occurrences of the substring old on each line and print the transformed text without changing the input file.
sed✓ Tested
Run your first program
Python: Start with a complete program that prints one line. Follow the run instructions below.
Python✓ Tested
Run your first program
C#: Start with a complete program that prints one line. Follow the run instructions below.
C#✓ Tested
Run your first program
Java: Start with a complete program that prints one line. Follow the run instructions below.
Java✓ Tested
Run your first program
JavaScript: Start with a complete program that prints one line. Follow the run instructions below.
JavaScript✓ Tested
Run your first program
TypeScript: Start with a complete program that prints one line. Follow the run instructions below.
TypeScript✓ Tested
Run your first program
C++: Start with a complete program that prints one line. Follow the run instructions below.
C++✓ Tested
Run your first program
C: Start with a complete program that prints one line. Follow the run instructions below.
C✓ Tested
Show the current directory
Print the absolute path of your current working directory before running commands that depend on relative paths.
directory✓ Tested
Store a value in a named variable
Python: Give a value a descriptive name and print it.
Python✓ Tested
Store a value in a named variable
C#: Give a value a descriptive name and print it.
C#✓ Tested
Store a value in a named variable
Java: Give a value a descriptive name and print it.
Java✓ Tested