Programming riddle - how to create file named "--help" [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 2 years ago.
Improve this question
Some time ago my friend asked me to create file named "--help" in Bash. Do you have an idea how to achieve this?

Ideas from top of my head:
: > --help
: >> --help
touch -- --help
dd if=/dev/zero of=--help bs=1 count=1
truncate --size 0 -- --help

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()

Bash - unzip: command not found [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am trying to unzip the file in particular folder and i am getting a "unzip command not found" error.
I am using Cygdrive to run my bash script
#!/bin/bash
for dir in ./"$WORKING"/*
do
unzip '*'
done
The package is unzip
setup -nqP unzip
or use the GUI.
in the wild

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.

bash-script-automatically [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 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

Resources