5,742 questions
0
votes
2
answers
185
views
How to accurately extract a block of text with CMD BATCH?
I'm trying to output part of a file (the text enclosed between :begin(...) and :end(...) markers) using a BATCH script. The target is pure ASCII text but it may contain blank lines and symbols; the ...
1
vote
0
answers
165
views
Laravel using "log" broadcast driver/connection despite setting it to Pusher
I am trying to use Pusher as my broadcast driver by setting BROADCAST_CONNECTION=pusher in my .env file which is used as the default in my broadcasting.php file. However, whenever I go to print out ...
-1
votes
1
answer
78
views
why does `set AUTH=on` or `set "AUTH=on"` not working in my computer? [closed]
I'm trying to set an environment variable named AUTH with the value of on but it's not working.
I have tried the following (both not working):
set AUTH=on
set "AUTH=on"
When I try to print ...
1
vote
1
answer
113
views
Snowflake SnowSQL debug command equivalent to echo/print
I'm discovering Snowflake, and am currently using a few SET commands to set session variables values.
Not going too much into the details (because I don't want anybody to focus on this part), I ...
0
votes
1
answer
78
views
How do I pass form data to the next form page after sending to a php mailto page?
I have a few forms on my website which I need site visitors to submit in sequence.
'form1' sends the user data to the (php mailto) form mailer.
The header(location) of the form mailer then directs the ...
0
votes
0
answers
34
views
How to implement background notification in web?
I have implemented Laravel Reverb in both public and private channels and working fine, however, I could not implement background service worker to receive notification on the PC from browser while ...
-1
votes
1
answer
35
views
Echoing a variable with a greater than sign (>) in a Windows command prompt causes a file creation, even after using the escape caret (^)
I would like to save the text Hello>World in a variable in a Windows command prompt, and then echo it.
So, I run the following commands, and I am properly escaping the text by using the caret ^>:...
1
vote
1
answer
96
views
Printing array with printf vs echo gives different results [duplicate]
I am trying to create an array from a file. In the troubleshooting process, I hope to print out all elements of the array to convince myself I'm doing it correctly. However, when I use a hard coded ...
0
votes
0
answers
37
views
Term for Repeating a Command as Interpreted/Executed
I'm writing a user manual for an embedded system, and I'd like to know if there's a commonly used term for repeating a command back to the user, but repeating it in the way that it was interpreted and ...
-1
votes
4
answers
81
views
Isolate last non 0 digit from IP address
I have to read an IP from def.cfg file that is set in a line named TERMINAL_IP (TERMINAL_IP = "192.168.0.140"), then do an append to the end of the def.cfg file with the last digit read that ...
1
vote
1
answer
162
views
How to use the echo command to display /? without it showing its own help information
I am writing a batch script featuring a help screen containing this echo string:
echo /? Show this screen
How would I prevent the echo command, in this case, from printing its ...
0
votes
2
answers
125
views
How can you portably echo a shell string without using printf?
I want to write the contents of a shell variable into a pipe, as it is, without modification. "echo -n" would be nice too.
Everyone says "use printf", something like
echo() {
...
0
votes
1
answer
88
views
Variable not being echoed correctly, inserting itself into another variable [duplicate]
I'm very new to bash and I have an assignment where I must create a script which reads an url and extract the http code, the encoding used and the word count. Everything works perfectly except the ...
0
votes
2
answers
104
views
Implement the ECHO command
Instructions
In this stage of this project I'm making, I need to add support for the ECHO command.
ECHO is a command like PING that's used for testing and debugging. It accepts a single argument and ...
0
votes
1
answer
77
views
Match output of a CURL in an IF-ELSE condition in BASH [duplicate]
I want to evaluate the output of a curl in an if-else.
If the first condition matches, then shell return 0 and hence I equate to zero.
Similarly for the second condition
If Nothing matches go to else ...
1
vote
0
answers
377
views
pusher send_event going through without auth in laravel reverb project
I'm working on this project that, in short, has a real-time chat system implemented with laravel reverb. Everything with dispatching events on the laravel server is working fine and the events are ...
0
votes
4
answers
100
views
A Small Challenge: How to Print the String "-e" Using Bash echo
I tried to print the string "-e" using echo
I tried
echo "" -e
but a space is printed before -e, the output is:
-e
so I tried to remove the space
echo ""-e
and the ...
0
votes
1
answer
79
views
UNION DISTINCT query PHP MySQL results blank
The query below works fine in phpMyAdmin and displays the correct results. However, when implemented on a php page, it shows nothing (a blank page). Can someone help me to display these results in the ...
0
votes
0
answers
110
views
Bash error trap does not catch stderr output after redirection to file
In my bash script I redirected stdout and stderr to a logs file to prevent it from being printed in the terminal.
I set my script to exit on error occurrence using set -e switch.
Now, whenever any ...
0
votes
2
answers
71
views
bash script to Echo multiple lists
i need to echo multiple list like this
list_0=(1 2 3 4 5 6)
list_1=(7 8 9)
list_2=(22 7 34 88)
.....
.....
list_99=(23 67 80)
I have this version that works but every time I have to declare new list ...
1
vote
1
answer
90
views
How to replace random lines with empty string 30% of the time in bash?
Assuming that I created a file with 10 lines:
yes "foo bar" | head -n 10 > foobar.txt
[out]:
foo bar
foo bar
foo bar
foo bar
foo bar
foo bar
foo bar
foo bar
foo bar
foo bar
And I want ...
1
vote
0
answers
41
views
Laravel Echo is undefined
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1....
-1
votes
2
answers
99
views
BASH: Assign values to variables with echo | sed | read [duplicate]
I'm trying to pass a string through a pipe going from echo to sed to read, but something isn't working:
#!/bin/bash
STR="alef|bet|gimel|daled"
echo $STR
echo $STR | sed 's/\|/ /g' | read ...
-2
votes
3
answers
89
views
Clarification on how PHP outputs true and false values [duplicate]
I would like to use a true/false result to do alternative things in PHP. I was surprised by the following:
$falsevar = false;
$truevar = true;
echo "falsevar which I just set to false is".$...
1
vote
2
answers
2k
views
Laravel 11 Reverb: WebSocket Connection failed
WebSocket connection to wss://subdomain.domain.com/app/... failed
Its working on locally without any issue but in production it gives issue
here is my .env for production
REVERB_APP_ID=401132
...
0
votes
1
answer
73
views
Building arrays in command line and calling them in a for loop as a single command
I am trying to build two arrays (arr1 and arr2 which will have the same length) in the command line to be referenced in a for loop.
Building the command like this from the script,
set arr1[0]="a&...
0
votes
1
answer
74
views
Bash Command Substitution in echo/printf doesn't print result on the same line? [duplicate]
Reproducible example
Consider this example:
#!/usr/bin/env bash
echo "[Status] $(killall --wait example)"
Expected output:
[Status] example: no process found
Actual result (being wrong ...
0
votes
1
answer
88
views
How do I keep the mysql client from echoing commands?
The mysql client on my Macbook echos command lines. Even when I turn echoing of command lines off in the shell, when I start up the mysql client it immediately begins echoing them. Then when I exit ...
2
votes
2
answers
106
views
How to cat text string and file in bash in way to preserve literal \newpage in output?
I have multiple markdown files that I am trying to concatenate into one markdown file in bash. I can concatenate markdown files and preserve “\newpage” lines, but when trying to add a group title via ...
1
vote
0
answers
47
views
Echo not printing CDATA tags in Wordpress
I am creating a RSS feed in WordPress. In my functions.php, I have
$content = htmlentities(strip_tags(get_the_content()), ENT_XML1, 'UTF-8');
echo '<description><![CDATA[' . $content . ']]>...
1
vote
2
answers
333
views
Does the echo command in Bash shell ever write anything to stderr without an explicit redirect of the output? [closed]
Plenty of other commands/binaries would (for example wc --wrong-flag) but is echo one of them?
Context: I am maintaining somebody else's Bash script, looking at the following section of it (slightly ...
2
votes
2
answers
2k
views
How to Live Reload golang REST project like nodemon in nodejs?
I want to run golang REST api project in echo labstack.
for development purpose i want that when i save file it automatically refesh the api's in VS code like nodemon does in nodejs.
i am trying to go ...
0
votes
0
answers
28
views
Trying to echo line variable along with another variable inside a while read loop
Am trying to echo a line variable along with another variable like below
while read -r line;do
id1=$(echo "$line"|grep...)
id2=`grep "$id1"...."
echo "$line" , "...
0
votes
1
answer
358
views
How to preserve newline characters in CSH when storing in a variable or echo
I have a python script which is getting called from a csh script ( I can not use bash). The python script prints out string with the newline characters and I am storing the output in a csh variable. ...
1
vote
1
answer
147
views
MSTeams echo bot using PowerShell Azure Functions
How should one parse the chat text received as JSON payload in the request body when using an outgoing webhook as an application in a Teams group to fetch the output of a PowerShell Azure function?
...
-1
votes
3
answers
3k
views
Echo -e on MacOS [closed]
I have a problem with script constantly printing signs \n. My script is made for bash and is set to posix=yes. When I ran program on Mac the printing to bash is done only by echo "text here"....
1
vote
0
answers
71
views
Difference between tcsh and bsd-csh in terms of use of square brackets in echo
I have two simple Shell scripts that essentially do the same thing (i.e., printing all arguments), as are shown below.
S1:
#!/usr/bin/tcsh
echo [$argv[*]]
S2:
#!/usr/bin/bsd-csh
echo [$argv[*]]
S1 ...
1
vote
1
answer
156
views
JSON String processing injects quotes
I get json encoded secrets from a Vaulwarden-Instance by their UUID.
I want so loop over any uuid and set environment variables accordingly.
For every field there should be variable (see below)
...
0
votes
1
answer
53
views
Can you have 2 queries on different tables to create check boxes and have them "checked"?
I am currently using a table that uses a show columns query to echo all the columns into checkboxes. The below code works for that. I tried to create another query right under the query to search a ...
0
votes
0
answers
54
views
Can a csh script be made to "Not Execute" the date command in an echo statement
I have a cron task that captures log files every six hours. We have a post installation script that executes after we do an install and this script builds the crontab. It is a csh script that uses the ...
4
votes
1
answer
2k
views
How to install templ in macos & windows. Error:- templ not found
docs says.
go install github.com/a-h/templ/cmd/templ@latest [This does not work.]
what I did.
1.
git clone https://github.com/a-h/templ.git [in /tmp]
cd cmd/templ && go install
still Error.
...
1
vote
0
answers
218
views
Exposing API endpoints in Wails with Axios (404)
I'm creating a desktop app using Wails with React.JS, I have a simple endpoint I want to expose, I'm using Axios to make requests from the React.JS Component, in the backend, I'm using echo to expose ...
1
vote
1
answer
179
views
Pipe an output into echo as an variable for calculation
My goal is to divide 2 text files, each containing a single integer,
but limiting the answer to 2 decimal places.
I managed to do it with paste total.txt count.txt | awk '{printf "%.2f\n", $...
1
vote
1
answer
95
views
Bash and echo command unexpected results
I am running an echo command in bash and I am seeing some unexpected results.
When running:
echo "{
"outputs": {
"result": "[{\"directory\":\"...
1
vote
1
answer
144
views
character-escaping double quotes in bash append file of command and output
I work with a variety of diagnostic files (text / jq for JSON / yq for YAML / xpath for XML, lnav for log files) in Bash where I need to dynamically determine meaningful data parsing before reporting ...
1
vote
0
answers
161
views
Error fetching data: SyntaxError: Unexpected end of JSON input at JSON.parse (<anonymous>)
im having problems with gorilla sessions mainly, but with nextjs and frontend too, i can fetch all my data with no problem, but when i try to send the user to the front end from the gorilla session ...
1
vote
0
answers
391
views
Python driven Alexa announcements
I have a python script that runs on my pc, monitors web data and occasionally prints an alert. I would like to feed this string to alexa so the alert is announced on all my echo devices. How can I ...
0
votes
2
answers
109
views
Bash IFS causes unexected results with array output
When IFS has its default value and an array is printed without quotes, the interpreted value doesn't have quotes, but when IFS doesn't have a space it it, it does.
Using an echo web server and curl to ...
-2
votes
1
answer
489
views
Suppress the output of the RUN command in a Dockerfile
How can I suppress the output of the RUN command in a Dockerfile? In the code below, I'm attempting to redirect the SSH_PRIVATE_KEY to a file using the echo command. However, during image building, ...
2
votes
1
answer
398
views
What is the minimal GDScript equivalent of Python websocket client code?
I'm attempting to program a simple turn-based game in Godot which relies on a Python websocket server for rules and state updates. To that end, I'm trying to make a simple prototype where I can input ...