F5F Stay Refreshed Software Operating Systems Bash Scripting help

Bash Scripting help

Bash Scripting help

Pages (2): 1 2 Next
H
HorseyHay
Member
208
02-23-2023, 04:08 PM
#1
Attempting to build a bash script for Handbrake CLI, encountering issues with folder creation. Directories .sh, test1, test2, test3 fail to appear as expected. Test3 appears fine. Same problem arises when testing EOL escaping with backslash. What’s going wrong?
H
HorseyHay
02-23-2023, 04:08 PM #1

Attempting to build a bash script for Handbrake CLI, encountering issues with folder creation. Directories .sh, test1, test2, test3 fail to appear as expected. Test3 appears fine. Same problem arises when testing EOL escaping with backslash. What’s going wrong?

R
Rewyrr
Junior Member
13
02-23-2023, 05:17 PM
#2
Semicolons?
R
Rewyrr
02-23-2023, 05:17 PM #2

Semicolons?

D
DrBrokenBones
Senior Member
378
03-08-2023, 05:59 PM
#3
This indicates the script isn't being found in the terminal. Check the path and ensure the file exists.
D
DrBrokenBones
03-08-2023, 05:59 PM #3

This indicates the script isn't being found in the terminal. Check the path and ensure the file exists.

J
james26665
Senior Member
537
03-09-2023, 04:33 PM
#4
Hey, I noticed you checked in! That’s great you took the time to review. Let me know if you need anything else.
J
james26665
03-09-2023, 04:33 PM #4

Hey, I noticed you checked in! That’s great you took the time to review. Let me know if you need anything else.

S
SlayFuzzy
Member
180
03-27-2023, 09:48 PM
#5
This involves testing on Windows with Linux via Windows Subsystem, using a script written in Notepad.
S
SlayFuzzy
03-27-2023, 09:48 PM #5

This involves testing on Windows with Linux via Windows Subsystem, using a script written in Notepad.

K
KillSt3al
Member
113
03-28-2023, 02:37 PM
#6
It seems like you're suggesting adding the return characters at the end. You might want to try Kate Editor for better results. It works well across all operating systems.
K
KillSt3al
03-28-2023, 02:37 PM #6

It seems like you're suggesting adding the return characters at the end. You might want to try Kate Editor for better results. It works well across all operating systems.

B
ByrRoZz
Member
175
03-30-2023, 02:01 AM
#7
It looks like your file format matches Windows conventions, but switching to Unix style resolves the issue. The first line appears as a command not found because of the line ending difference.
B
ByrRoZz
03-30-2023, 02:01 AM #7

It looks like your file format matches Windows conventions, but switching to Unix style resolves the issue. The first line appears as a command not found because of the line ending difference.

B
Brudora
Senior Member
726
03-30-2023, 09:12 AM
#8
Save me
B
Brudora
03-30-2023, 09:12 AM #8

Save me

J
JackCUBED
Junior Member
15
04-01-2023, 04:14 PM
#9
Your script might behave differently on Windows due to line separation rules. Consider adding a shebang at the top, such as #!/bin/bash, and save it as a UNIX file. This ensures proper handling of line endings across systems.
J
JackCUBED
04-01-2023, 04:14 PM #9

Your script might behave differently on Windows due to line separation rules. Consider adding a shebang at the top, such as #!/bin/bash, and save it as a UNIX file. This ensures proper handling of line endings across systems.

T
ThatEnderman64
Junior Member
47
04-18-2023, 09:28 AM
#10
I just created a script that executes those commands and worked on Ubuntu 17.04 without using WSL. I saved it in nano and tried to install it. Remember to add the shebang line and make sure the file is executable.
T
ThatEnderman64
04-18-2023, 09:28 AM #10

I just created a script that executes those commands and worked on Ubuntu 17.04 without using WSL. I saved it in nano and tried to install it. Remember to add the shebang line and make sure the file is executable.

Pages (2): 1 2 Next