C
C
copal2015-12-09 21:51:59
bash
copal, 2015-12-09 21:51:59

How to create a clickable command sequence startup file for ubuntu?

I need to run a program and feed it a certain file that needs to be cleared first. Is it possible to somehow automate this in order to execute a file in the console or with the mouse that would run a sequence of commands for the console? If possible, how and what should be written there? Make an example that would just open file.md. Better yet, two commands, open and close immediately, so that it is clear how to write a chain. Although it is possible simply without commands, the main thing is to make it clear.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xotkot, 2015-12-09
@copal

$ touch file.sh
$ chmod +x file.sh

cat file.sh
#!/bin/bash

# очищаем заданный файл
echo -n > file.md

# далее следуют необходимые команды
# ...

ps
you don't need to specifically open and close files in the bash)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question