mirror of
https://github.com/zedsalim/debian-z.git
synced 2025-12-07 20:09:27 +00:00
Updates
This commit is contained in:
parent
8524f1496d
commit
bfe8b96c91
17 changed files with 1027 additions and 84 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd /home/zed/Documents/c_projects
|
||||
cd /home/$USER/Documents/c_projects
|
||||
|
||||
# List all directories in the current directory
|
||||
dirs=(*/)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd /home/zed/Documents/c_projects
|
||||
cd /home/$USER/Documents/c_projects
|
||||
|
||||
ls
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd /home/zed/Documents/c_projects
|
||||
cd /home/$USER/Documents/c_projects
|
||||
|
||||
# List all directories in the current directory
|
||||
dirs=(*/)
|
||||
|
|
|
|||
|
|
@ -1,31 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd /home/zed/Documents/python_projects
|
||||
|
||||
# List all directories in the current directory
|
||||
dirs=(*/)
|
||||
echo "Choose your project:"
|
||||
|
||||
# Loop through the directories and print a numbered list
|
||||
for i in "${!dirs[@]}"; do
|
||||
printf "%s\t%s\n" "$i" "${dirs[$i]}"
|
||||
done
|
||||
|
||||
# Prompt the user to enter a number
|
||||
read num
|
||||
|
||||
# Check that the input is a valid number
|
||||
re='^[0-9]+$'
|
||||
if ! [[ $num =~ $re ]] ; then
|
||||
echo "Error: Not a valid number" >&2; exit 1
|
||||
fi
|
||||
|
||||
# Get the name of the selected directory
|
||||
name=${dirs[$num]}
|
||||
name=${name::-1}
|
||||
|
||||
cd "$name"
|
||||
|
||||
clear
|
||||
# Compile and run main.c
|
||||
python3 main.py
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd /home/zed/Documents/python_projects
|
||||
|
||||
ls
|
||||
|
||||
echo "Enter the file's name: "
|
||||
|
||||
read name
|
||||
|
||||
mkdir $name
|
||||
|
||||
cd $name
|
||||
|
||||
touch main.py
|
||||
|
||||
code main.py
|
||||
|
|
@ -1,30 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd /home/zed/Documents/python_projects
|
||||
|
||||
# List all directories in the current directory
|
||||
dirs=(*/)
|
||||
echo "Please choose a project by entering the corresponding number:"
|
||||
|
||||
# Loop through the directories and print a numbered list
|
||||
for i in "${!dirs[@]}"; do
|
||||
printf "%s\t%s\n" "$i" "${dirs[$i]}"
|
||||
done
|
||||
|
||||
# Prompt the user to enter a number
|
||||
read num
|
||||
|
||||
# Check that the input is a valid number
|
||||
re='^[0-9]+$'
|
||||
if ! [[ $num =~ $re ]] ; then
|
||||
echo "Error: Not a valid number" >&2; exit 1
|
||||
fi
|
||||
|
||||
# Get the name of the selected directory
|
||||
name=${dirs[$num]}
|
||||
name=${name::-1}
|
||||
|
||||
cd "$name"
|
||||
|
||||
# Open main.c in nano
|
||||
code main.py
|
||||
Loading…
Add table
Add a link
Reference in a new issue