Questions tagged [quotes]

Computer programming languages' facility for embedding text in source code, also known as String literals

Filter by
Sorted by
Tagged with
0 votes
1 answer
52 views

Use quotas as delim skipping two lines in batch script

I'm stuck on a statement that I've already used multiple times with other delimiters. I have to process a three-line TXT file, each line contains 26 fields delimited by quotes. This is the file in ...
Mirco's user avatar
  • 3
-4 votes
0 answers
73 views

How to replace single quotes with double quotes while maintaining single quotes within outer single quotes? [closed]

I get a return string from a JSON API,which gives me everything in single quotes... str = "{'uid': '12345', 'title': 'David's house'}" How can I replace all single quotes with double quotes,...
Christopher Cook's user avatar
1 vote
1 answer
51 views

How can I specify for SQL to read a string in ordinary quote in DuckDB?

I have written a python queries with DuckDB: import duckdb con = duckdb.connect() con.query('CREATE TABLE people(id INTEGER, name VARCHAR);') con.query('INSERT INTO people VALUES (1, 'Mark'), (2, '...
Антон Попенко's user avatar
0 votes
1 answer
54 views

Using a variable with Get-ADComputer -filter

I might be overthinking this, but have been unable to get this simple code edit to work with Powershell This works fine Get-ADComputer -Filter "operatingsystem -like "Windows server 2012&...
Kenny's user avatar
  • 141
0 votes
0 answers
69 views

How to replace all double quotes in a polars DataFrame?

I have a csv-file, where some strings are enclosed in double quotes ("), others are not. I read the file into a polars DataFrame using python. The table looks something like this: ┌────────────┬──...
centershocks's user avatar
0 votes
0 answers
27 views

how to pass a variable that include a string with line break to git message [duplicate]

I have A=123 B="abc${A}efg\n\ ijk" if I echo $B it returns: abc123efg ijk I want to pass B as the git commit message like this: git commit -m $B However, it does not create multiple lines ...
Amin Ba's user avatar
  • 1,801
0 votes
1 answer
45 views

PHP snag when using strange quotes

Copying a mySQL-driven application and its web-pages (in PHP) I spent 2 days of time debugging the problem exemplified by code below. The 2 "didn't work" comment of course do not apply to ...
troppapolvere's user avatar
0 votes
1 answer
73 views

SSH Remote Code Execution Script over Jumphost (Nested Quotes)

Consider the following infrastructure: ServerA ---> ServerB ---> ServerC I want to get large files from ServerC (thus filtering them first) and save them on ServerA by running a script on ...
xard's user avatar
  • 3
0 votes
0 answers
47 views

C x-macro with with C-style strings (const char*) include unexpected quotes when used

My first foray into x macros seems to be progressing well, but I'm stumped on one point which the below code and output shows. Basically, the part that's not working the way I want it to is creating ...
funbotix's user avatar
0 votes
2 answers
47 views

Backslash Escape Character in command echo

Can anyone explain why \n is not working as line break? [user1@localhost ~]$ echo -e a\nb\nc anbnc
joe's user avatar
  • 33
1 vote
1 answer
47 views

Escaping $_ in powershell inside python

Can you please tell me why the dollar sign output does not work? I used this construction: commands = ( f'powershell.exe -noprofile -command "&Get-ADUser -Filter (\\"OfficePhone -...
Norbert  Yuhas's user avatar
1 vote
1 answer
31 views

How to put quotes in powershell with variables inside python?

I'm trying to use paramiko to send to the server via ssh. I can't get paramiko to send multiple ops in a row, so I made a powershell oneliner that works in ps: powershell.exe -noprofile -command "...
Norbert  Yuhas's user avatar
0 votes
0 answers
32 views

how do I create a function in R to accept both NULL and Non-NULL values of parameters when using tidyverse? [duplicate]

I want to create a function whereby if I enter the name of a grouping variable in a tibble to be NULL I want the function to output the number of entire rows in the tibble. However, if I enter the ...
Andrew's user avatar
  • 109
1 vote
2 answers
45 views

how to handle quotes on using javascript eval

var userString = `var a='sister\'s'` eval(userString) //error I will get the user string and do eval, it throws parse error since the string is escaped. How to eval it properly , i saw we can ,make ...
MOHAMED SIKKANDAR AFZAL M's user avatar
0 votes
2 answers
54 views

Remove specific quotes from csv file using bat file

I have next csv file with data like xml "<Person> <Name> ""Test"" </Name> <Surname>""Test1""</Surname> </Person&...
pape's user avatar
  • 239
0 votes
0 answers
44 views

How to input a full cmdline to qemu using bash?

This is my script: KERNEL_CFG="-kernel Image -append \"root=/dev/vda1 nokaslr console=ttyAMA0 earlycon=pl011,mmio,0x09000000\"" DISK_CFG="-drive if=none,file=$DISKFILE,format=...
peng6662001's user avatar
0 votes
0 answers
74 views

PowerShell script - escaping quotes in a csv file

I'm working with a script that opens up a csv, splits it into multiple smaller csvs than compresses the files so they can be easily uploaded. The script does a fine job at this, but I need a way to ...
PracticingPython's user avatar
1 vote
2 answers
52 views

How to unambiguously quote when printing all args passed to a bash function? But taking care to quote special characters, avoid using the backslash?

Basically I need a shell function called echo_Q (or an echo -Q option), than will echo a quoted argument list, while "[nicely]" strictly avoiding any backslash-quoting on any of the ...
NevilleDNZ's user avatar
  • 1,279
1 vote
1 answer
873 views

Pass string with quotes as variables to dbt/Jinja

I try to run some dbt code and hand over a variable that includes quotes: SELECT field_1, field_2 FROM {{ source('schema', 'table') }} WHERE region IN ({{ var("regions") }...
Thomas L.'s user avatar
  • 593
0 votes
1 answer
105 views

Overleaf LaTeX: Double quotes showing as End Quotes in Latex when using listings package

Hey Stack Overflow Community, I am getting the following issue with the following code in LaTeX: \begin{lstlisting}[language=Python] for file in files: print(file) #Printing the file helped us ...
Sid Meka's user avatar
0 votes
0 answers
15 views

Running npm by short path with quotes ("npm.cmd") causes it to searching for `npm-cli.js` by wrong path

I just call npm -v. Let's see 6 ways to call it: [Ok] npm -v [Ok] npm.cmd -v [Ok] "C:\Program Files\nodejs\npm" -v [Ok] "C:\Program Files\nodejs\npm.cmd" -v [Error] "npm"...
user1234567's user avatar
  • 4,071
0 votes
1 answer
39 views

Get-ItemProperty output between "" quotes

Is there any way to get the "Get-ItemPropertyValue" output separated by semicolon each element and the whole output between quoutes? For example: Get-ItemPropertyValue -Path 'HKLM:\SYSTEM\...
szaboors's user avatar
1 vote
2 answers
88 views

Why are there two pairs of quotes for PowerShell arguments?

I was building a Windows Service that needs to periodically execute PowerShell scripts (*.ps1 -Option Value etc) via C#'s Process and I found this answer here about how to do this, but the example ...
t3chb0t's user avatar
  • 16.8k
0 votes
2 answers
50 views

Passing variables to a variable in bash

I'm writing custom logging for the bash: #!/usr/bin/env bash set -e +x SCRIPT_LOG_NAME='[MYSCRIPT]' SCRIPT_LOG_DATETIME_FORMAT="+%Y-%m-%d %H:%M:%S" SCRIPT_LOG_LEVEL_INFO='INFO' ...
Michael Linker's user avatar
3 votes
3 answers
99 views

R: Removing all quoted values in a string

I'm starting my first text analysis project in R using Twitter data and in the pre-processing stage I'm trying to remove all values that appear within quotation marks. I've found some code that ...
Christina's user avatar
1 vote
2 answers
77 views

PHP regex to format json string without quotes

I have a string of json objects I need to json_decode but the json format is not valid because it doesn't have double quotes (or any quote). And some texts have commas what makes it more difficult to ...
LauraEld's user avatar
  • 329
1 vote
1 answer
124 views

Using PowerShell To Create Scheduled Task With Spaces

I have two script to use as part of an application install. The first script creates a scheduled task to run the second script after the server reboots. That portion of the script is: $installScript ...
Christopher Cass's user avatar
2 votes
1 answer
116 views

Batch file auto-elevation using powershell and not mangling the arguments but problem with invokation

I am trying to implement the function proposed by mklement0 on this answer My goal is to implement this as a reusable batch subfunction But before that I have run into a pattern of inconsistent ...
Shodan's user avatar
  • 1,074
1 vote
1 answer
54 views

Powershell 'call' passing redirects to program instead of actioning it

I am trying to get powershell to call an exe with a constructed list of parameters - and to pipe the response to a log file. My issue is the redirect characters seem to be passed to the exe. (I have ...
jc508's user avatar
  • 93
-3 votes
2 answers
54 views

PYTHON Sort and Print Dicitonary without Brackets

Here's my code: `tv_dict = {} user_input = input() file_open = open(user_input) file_content = file_open.readlines() new_content = [] for x in file_content: new_content.append(x.strip()) ...
trevnethers's user avatar
0 votes
2 answers
28 views

Advanced Recursive Quote Embedding for HTML and Javascript

I have a program that lets me show what the same code would look like in multiple programming languages. I'm compiling it to a web page in HTML, which uses button onclick handlers to switch the code ...
erixoltan's user avatar
0 votes
0 answers
23 views

How to remove multiple columns from CSV via terminal? [quotes separator]

I need to delete columns 1-3, 5 of a csv file with terminal The problem is that I don't have comma separators and have quotes for each cell so usual commands don't work I have something like this : &...
Ruslan bilinenko's user avatar
1 vote
1 answer
38 views

`runhaskell` can't see packages if the arguments are passed in the form of a variable

Whenever I pass explicit parameters to runhaskell command using a variable, in order to make a specific package visible, for example: #!/bin/bash args="'-package pandoc'" runhaskell --ghc-...
F. Zer's user avatar
  • 1,113
1 vote
1 answer
48 views

If input() returns a string, why doesn't print() display the quotation marks?

I'm having trouble understanding the following: According to my book, unless otherwise specified, input will return a string type. If a string is printed wouldn't you expect the quotes to be included ...
smallcactus's user avatar
0 votes
0 answers
10 views

How do you add single quotes to words in Series in Pandas?

I have a series that I am trying to add single quotes to. The following code returns just one single quote. Test03 = pd.Series (['BEWO, SLSD, VWTR,']) Test03.str.replace(' ',"'" ) Result 0 ...
Spencer Neal's user avatar
0 votes
0 answers
16 views

Array with two objects and string how to remove Quotes

I had to .concat two objects and a string, the string didn't have surrounding quotes and now it does, I have tried .replace in every different way, please, is there a way to remove the quotes ...
Brian Martin's user avatar
1 vote
1 answer
68 views

Convert tuple with quotes to csv like string

How to convert tuple text = ('John', '"n"', '"ABC 123\nDEF, 456GH\nijKl"\r\n', '"Johny\nIs\nHere"') to csv format out = '"John", """n""...
aeiou's user avatar
  • 347
0 votes
0 answers
6 views

regextract text between (" text ")

I need to extract text between (" text ") from a column I tried =REGEXEXTRACT(A2, "(?<=(")\w+") but there's a formula parse error. I tried =REGEXEXTRACT(A2, "(?<=(&...
Izz's user avatar
  • 1
3 votes
1 answer
137 views

How to solve problem with quotes in arguments on calling a PowerShell script with -File option?

I want to call a small PowerShell (v5.1) script from Windows 10 Pro command line with arguments. param($ReqURL, $JSONString) Write-Host $ReqURL # for debug Write-Host $JSONString # for debug Invoke-...
AlexK's user avatar
  • 73
0 votes
0 answers
45 views

Writing a dataframe to a csv file that has a lot of punctuation - but getting it broken into multiple rows

I have this data frame with one URL: df <- data.frame("url" = "http://www.nycourts.gov/reporter/3dseries/2011/2011_00286.htm", "text" = "") I am trying to ...
user17661126's user avatar
0 votes
1 answer
113 views

How do I handle a string that has all 3 type of quotes? ("", '', ``)?

I know you normally would escape the quotes, but that is not an option in this case. This issue is happening to me in a GitHub Action where I'm trying to use: ${{ github.event.workflow_run.head_commit....
torwent's user avatar
1 vote
1 answer
117 views

File path with spaces not working in batch file

I am trying to cat a text file containing a PowerShell script from a .bat file into PowerShell running within the command line. It's kind of a workaround to start a PowerShell script on startup ...
TommyMaes's user avatar
0 votes
1 answer
78 views

Trying to echo/redirect/append a variable value that has & and spaces in it without the quotes messing things up

In a batch file, suppose %PageName% has the value: This & That And %FolderName%: Stuff & Junk I want to be able to echo the following line and append it to an HTML file. The expanded or &...
fortissimo's user avatar
0 votes
1 answer
39 views

Issue using diff with array and value quoted SHELL [duplicate]

Hi guys i'm having an issue while using diff. In my script i'm trying to compare all files in 1 dir to all files in 2 other dir Using diff to compare is files are the same. Here is my script : ` #!/...
Marc-Antoine Xavier's user avatar
0 votes
1 answer
34 views

How to deal with apostrophes when calling a stored function?

I have a pretty straight forward question about something that bugs me for some reason. Let's say we have this PL/SQL function: CREATE OR REPLACE FUNCTION gettextfromtitle(title text) RETURNS SETOF ...
Febraiz's user avatar
  • 31
1 vote
2 answers
66 views

Quoting options with mixed strings and multiple vars?

Goal: I have a sneaking suspicion that I'm globbing incorrectly due to not being able to find a satisfactory explanation with multiple clear examples of advanced string-and-var mixing. The operation I ...
Wolfpack'08's user avatar
  • 4,010
0 votes
1 answer
26 views

how do I get one quote to show instead of all API in vue3 script setup?

js and Im using composition API with script setup. Im doing a simple quote generator and fetching API. Its just that I get ALL quotes to show when I press the button. How can I do so only one random ...
tocajossan's user avatar
1 vote
1 answer
452 views

How to add quotation marks on a value on registry?

How do I add into the registry in which the value of the UninstallString needs to have quotation marks at the beginning and end. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\...
KyleXY's user avatar
  • 41
1 vote
2 answers
108 views

pandas field separator and double quotes

I need to load in pandas a CSV file that is not 100% CSV "compliant", below an example: "Transaction date";"Accounting date";"Counterparty's data";"Title&...
EBAH's user avatar
  • 99

1
2 3 4 5
43