bash-script-automatically [closed] - bash

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I wrote the following script:
#!/bin/bash
./vlc $nom > $fichier
gedit $fichier
In the execution of my script. The first command (. / vlc $ name> $ file) runs but once the video is playing. The second command is not executed.
For that the second command runs, I would have to return to the console and I do: Ctrl+C
I would like everything is done automatically.
You have any idea please?

Maybe what you want is for the first program to run in the background:
./vlc $nom > $fichier &
gedit $fichier

Related

I have a Bash file I want to edit it and change [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
How can I change the 127.0.0.1 to another IP address using echo or cat without nano or Vim?
Here's the Bash command and the Bash file name is listpics:
python3 poc.py --cmd listPics --ip 127.0.0.1
For your specific case, you could do this:
with open('listpics', 'r+') as listpics:
data = listpics.read().replace('127.0.0.1', '192.168.1.254')
listpics.seek(0)
listpics.write(data)
listpics.truncate()

I want to write a bashrc alias that launches commands in multiple new terminals [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I have 3 parts for my workflow that I would like to alias to a single line ‘workflow’. Each command will run a server in terminal so I’ll need the command to open multiple tabs preferably on the same window.
I don’t know too much about writing bashrc scripts so I’m not sure how to put it into a single line. Essentially I want gnome-terminal —-tab —-tab —-tab to run and then for each tab run one of these; psql mydb, Jupyter lab, metabase.
Any help would be great!
You can try:
gnome-terminal --tab -e "psql mydb" --tab -e "Jupyter lab" --tab -e "metabase"

Simple bash script if function [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I want to make a bash script that will ls the catalog and if it finds file test it will launch mplayer, is it possible?
If I understand your requirement correctly, one option would be to use find:
find /path/to/catalog -type f -exec mplayer {} +
This searches the catalog directory for any files and builds a command using the results (for example if file1 and file2 were found, the command executed would be mplayer file1 file2). If no files are found, no command will be executed.

Changing batch to shell [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
This is my first question, and I've finally resorted to asking as my hours of googles haven't returned anything good. Would it be possible to convert this batch script to a Linux shell?
#echo off
cd ../bin
color 0a
Title DavidScape 508
"C:\Program Files\Java\jdk1.6.0_11\bin\java.exe" DavidScape/Server 43594
pause
Thanks!
Something close would be:
#!/bin/sh
cd ../bin
echo -ne "\033[40;1;32m"
java DavidScape/Server 43594
read

Inserting arguments as part of another argument in bash alias or function [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
I'd like to make a bash function (or alias) like:
function warmup() { ab -n100 http://$1.myapp.appspot.com/ ;}
But I get:
$ warmup some_version
ab -n 1000 -c 5 http://.myapp.appspot.com/ some_version
What am I doing wrong? Is this possible?
It works for me in bash 4.2.10, it might not work on an older version. Try upgrading yours.

Resources