Linked Questions

1 vote
1 answer
5k views

I have the below string: "BBBB,AAAA" seperated with comma. I need to append .done with each value of the string. When i try below. It doesnot work. I try to replace , with .done but its doesnot ...
XING's user avatar
  • 9,916
0 votes
2 answers
325 views

I've been trying to wrap my head around this for over an hour now and my searches haven't helped yield the answer. Trying to set a variable inside a bash script. This variable is taking variable-A ...
BlackOpRogue's user avatar
0 votes
1 answer
242 views

I've been trying to write a bash script. A part of it is supposed to replace a part of a string with nothing. Here's what I'm trying to do $dbname=$1 $dbNameActual="${$dbname/.sql/}" date echo $...
Igor Q.'s user avatar
  • 728
-1 votes
1 answer
430 views

I want to start developing in c#, however I use Linux and VSCode for development and VSCode doesn't run the code due to some error that I can't find an answer to, so I decided with the help of this ...
Apoqlite's user avatar
  • 309
0 votes
0 answers
335 views

I have string /logoDown?path=logo/5402eca1b4a0e/Lighthouse.jpg&isLogo=1&fileType=jpg Now i want to replace word logo with sep/2014/09/03/past/ so the new string will become /logoDown?...
user3363969's user avatar
-1 votes
1 answer
171 views

How can I replace a " by \" inside a string using bash? For example: A txt-File contains text like: Banana "hallo" Apple "hey" This has to be converted into: Banana \"hallo\" Apple \"hey\" I tried ...
Anne K.'s user avatar
  • 415
-1 votes
3 answers
82 views

I'm trying to swap the date in a log file's name using a bash script. I cannot seem to get the date's to play nice however. When I try to swap the dates using sed, the original date is still in the ...
GreenGodot's user avatar
  • 6,893
1 vote
2 answers
54 views

When I do that: VAR1="My_ID" VAR2="/Path/to/some/resource/$VAR1/in/local/machine" echo $VAR2 then output is: /Path/to/some/resource/Special/My_ID/local/machine But when ID="...
Krzysiek's user avatar
0 votes
0 answers
47 views

I need to ensure a directory is always created lowercase, regardless of what the user inputs. Here's some sample inputs: ./1A_Internal/foo/bar/baz/ ./External/wizz/bang/baz/ ./Validated/bink/bank/...
Alex's user avatar
  • 2,855
272 votes
22 answers
221k views

I have some script that produces output with colors and I need to remove the ANSI codes. #!/bin/bash exec > >(tee log) # redirect the output to a file but keep it on stdout exec 2>&1 ...
Pawel P.'s user avatar
  • 4,229
164 votes
5 answers
548k views

I can't find PHP.ini location on my server. I've checked all Stack Overflow answers but I can't find my php.ini location. I have Linux, Cent OS, zPanel. Last version of PHP. My computer: Linux Mint ...
ITChristian's user avatar
  • 11.3k
128 votes
10 answers
129k views

How can Bash rename a series of packages to remove their version numbers? I've been toying around with both expr and %%, to no avail. Examples: Xft2-2.1.13.pkg becomes Xft2.pkg jasper-1.900.1.pkg ...
Jeremy L's user avatar
  • 7,827
59 votes
5 answers
77k views

Can tr replace one character with two characters? I am trying to replace "~" with "~\n" but the output does not produce the newline. $ echo "asdlksad ~ adlkajsd ~ 12345" | tr "~" "~\n" asdlksad ~ ...
Paolo's user avatar
  • 1,637
18 votes
6 answers
12k views

I want to rename all erb files in my Git project to haml.(like index.html.erb to index.html.haml) If I rename each file, I have to type the following command more than thirty times. $ git mv app/...
Junichi Ito's user avatar
  • 2,628
15 votes
4 answers
31k views

I'd like to replace a string within a variable, e.g.: Test=Today, 12:34 I'd like to replace the "Today" within the variable Test with a Date variable I declared before. I tried using the ...
X3nion's user avatar
  • 321

15 30 50 per page