arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Hidden Refuge's Benchmark 2.0 script
#5
actually you can pass argument to the bash when you are using pipe to direct the downloaded file through stdin to the bash (which by the way is a child process with another pid. if you are already using bash shell then it will be a child. another bash shell. ps -AF --forest shows it all very nicely). you need -s

therefore it becomes

wget --no-check-certificate https://raw.githubusercontent.com/hidden...r/bench.sh -O - -o /dev/null | bash -s -- -b

or use /dev/stdin if available in system.

but direct piping like that is bad from security standpoint. you dont get to see things. only do when you know what you are doing and know the script thoroughly.

also not all script will work through piping. cause stdin is engaged (the script is not on disk but in RAM and being executed step by step. through stdin) and not available for user interaction or intervention in that child bash process.

the following three are the ones we should use...

1] . ./script.sh (. is source command. the one we use to set up environment. in profile or .bashrc etc)

2] bash ./script.sh

3] ./script.sh after using shebang and doing chmod

so the command using && as given by HR is one of the best oneliners.
Sincere Thanks to VirMach for my VPS9. Also many thanks to Shadow Hosting and cubedata for the experiences I had with their VPSs.


Messages In This Thread
RE: Hidden Refuge's Benchmark 2.0 script - by rudra - 12-11-2018, 05:53 PM

Possibly Related Threads…
Thread
Author
Replies
Views
Last Post
3,160
08-22-2019, 05:41 PM
Last Post: Mashiro
128,284
02-20-2019, 04:49 PM
Last Post: deanhills

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting