Tag: r

53 votes
23 answers
1.4K views
How can I declare and use Boolean variables in a shell script?

I tried to declare a Boolean variable in a shell script using the following syntax: variable=$false variable

avatar
Freida
0 1 0 9
asked 07 September, 2021
62 votes
14 answers
1.7K views
YYYY-MM-DD format date in shell script

I tried using $(date) in my bash shell script, however, I want the date in YYYY-MM-DD format. How do I get thi

avatar
Adolfo
0 1 0 9
asked 07 September, 2021
61 votes
20 answers
1.1K views
How to use SSH to run a local shell script on a remote machine?

I have to run a local shell script (windows/Linux) on a remote machine. I have SSH configured on both machine

avatar
Dusty
0 1 0 9
asked 07 September, 2021
58 votes
21 answers
909 views
How to convert a string to lower case in Bash?

Is there a way in bash to convert a string into a lower case string? For example, if I have: a="Hi all" I

avatar
Tuan
0 1 0 9
asked 07 September, 2021
61 votes
30 answers
1.2K views
How do I prompt for Yes/No/Cancel input in a Linux shell script?

I want to pause input in a shell script, and prompt the user for choices. The standard Yes, No, or Cancel type

avatar
Kristopher
0 1 0 9
asked 07 September, 2021
61 votes
20 answers
3.1K views
Loop through an array of strings in Bash?

I want to write a script that loops through 15 strings (array possibly?) Is that possible? Something like: f

avatar
Venice
0 1 0 9
asked 07 September, 2021
58 votes
20 answers
1.7K views
How do I iterate over a range of numbers defined by variables in Bash?

How do I iterate over a range of numbers in Bash when the range is given by a variable? I know I can do this

avatar
Benton
0 1 0 9
asked 07 September, 2021
58 votes
16 answers
1K views
How to reload .bashrc settings without logging out and back in again?

If I make changes to .bashrc, how do I reload it without logging out and back in?

avatar
Freida
0 1 0 9
asked 07 September, 2021
58 votes
30 answers
2.5K views
How to check if a variable is set in Bash?

How do I know if a variable is set in Bash? For example, how do I check if the user gave the first parameter

avatar
Basil
0 1 0 9
asked 07 September, 2021
53 votes
19 answers
1.4K views
How to delete from a text file, all lines that contain a specific string?

How would I use sed to delete all lines in a text file that contain a specific string?

avatar
Fabian
0 1 0 9
asked 07 September, 2021
47 votes
16 answers
1.6K views
How to mkdir only if a directory does not already exist?

I am writing a shell script to run under the KornShell (ksh) on AIX. I would like to use the mkdir command to

avatar
Yolando
0 1 0 9
asked 07 September, 2021
48 votes
30 answers
1.1K views
How do I split a string on a delimiter in Bash?

I have this string stored in a variable: IN="[email protected];[email protected]" Now I would like to split the stri

avatar
Lynette
0 1 0 9
asked 07 September, 2021
62 votes
18 answers
403 views
In the shell, what does " 2>&1 " mean?

In a Unix shell, if I want to combine stderr and stdout into the stdout stream for further manipulation, I can

avatar
Renaldo
0 1 0 9
asked 07 September, 2021
51 votes
26 answers
2K views
How to check if a string contains a substring in Bash

I have a string in Bash: string="My string" How can I test if it contains another string? if [ $string ?? &ap

avatar
Sena
0 1 0 9
asked 07 September, 2021
51 votes
30 answers
1.5K views
How to concatenate string variables in Bash

In PHP, strings are concatenated together as follows: $foo = "Hello"; $foo .= " World"; Here, $foo becomes

avatar
Luis
0 1 0 9
asked 07 September, 2021
62 votes
5 answers
2.6K views
Why split the View in MVC into a view class and a template

I'm relatively new to design patterns but I feel that I've got a good understanding of the MVC patte

avatar
Denese
0 1 0 9
asked 07 September, 2021
56 votes
3 answers
2.3K views
REST API for Joomla 3.0

I'm currently using the Joomla 3.3.6 and need to find a REST API to access the content information, user

avatar
Lashawna
0 1 0 9
asked 07 September, 2021
60 votes
4 answers
2.7K views
joomla BASE HREF uses HTTP instead of HTTPS

I wanted to change my site from http to https. Always. So I configured my apache accordingly. Now when I ente

avatar
Kisha
0 1 0 9
asked 07 September, 2021
63 votes
3 answers
2.3K views
insert into database from Joomla form fields

I am beginner to Joomla! development and have created a very simple module. How do I create a form with 3 tex

avatar
Frederick
0 1 0 9
asked 07 September, 2021
67 votes
1 answers
2.1K views
What are the differences between Joomla Model Types?

I'm trying to get to grips with the power behind Joomla (3.x)'s framework. I've noticed that th

avatar
Benton
0 1 0 9
asked 07 September, 2021