Related
Green vegetables I'm trying to make a batch program that takes variables from basic CMD commands. E.g: c:\Users> ipconfig
.....
IPv4 Address ....... 123.456.7.89
.....
Suppose I want to make a batch program that just prints the IP address on the screen like:
Dominica I'm trying to write a script in Bash to add some firewall rules. The variable I'm passing doesn't work, I think I'm doing the substitution wrong. firewall-cmd --add-rich-rule='rule family="ipv4" source address="$IP/32" port port=10000 protocol=tcp acc
Molly For example, I want the process "myexe.exe" to run on any host. So I want the hostname to be evaluated on each computer and inserted into the command. Ideally, I'd like all of this to be done in one line. I tried the following code. mpiexec -n 8 -hosts 1
Molly For example, I want the process "myexe.exe" to run on any host. So I want the hostname to be evaluated on each computer and inserted into the command. Ideally, I'd like all of this to be done in one line. I tried the following code. mpiexec -n 8 -hosts 1
Molly For example, I want the process "myexe.exe" to run on any host. So I want the hostname to be evaluated on each computer and inserted into the command. Ideally, I'd like all of this to be done in one line. I tried the following code. mpiexec -n 8 -hosts 1
Honshitz I also want to pass some variables in command prompt along with some other text. I try to use this code but it doesn't work. Any hints that I might be doing something wrong, or how I should be doing it? There is a variable "v" that stores the URL and
Honshitz I also want to pass some variables in command prompt along with some other text. I try to use this code but it doesn't work. Any hints that I might be doing something wrong, or how I should be doing it? There is a variable "v" that stores the URL and
pull Let me specify a question. I want to issue commands so when the user types eg. go (something)It will use goto specify the function somethingand find what the program should do when the variable equals something. If anything is unclear, just ask, I know my
pull Let me specify a question. I want to issue commands so when the user types eg. go (something)It will use goto specify the function somethingand find what the program should do when the variable equals something. If anything is unclear, just ask, I know my
Vasyl Kozhushko I wrote a piece of code and it works fine, but I need to use variables instead of static numbers in ranges 8 and 16 cat /etc/passwd | sed '/^#/d' | sed -n 'n;p' | sed 's/:\(.*\) //g' | sed 's/ /,/g' | sed 's/\(.*\),/\1./' | sort -r | sed 's/*ra
Palmer I'm trying to export characters from a reference file whose byte positions are known. For this, I have a long string of numbers stored as variables, which are used as input to tail commands. For example, the reference file looks like this: ggaaatgcattca
Vasyl Kozhushko I wrote a piece of code and it works fine, but I need to use variables instead of static numbers in ranges 8 and 16 cat /etc/passwd | sed '/^#/d' | sed -n 'n;p' | sed 's/:\(.*\) //g' | sed 's/ /,/g' | sed 's/\(.*\),/\1./' | sort -r | sed 's/*ra
Ozcan I am trying to add some text (path) to the end of the line found by the sed command: var="/folder1/folder2/folder3"
sed -i "/Begins with this text/s/$/$var/" filename
I know double quotes are required when using variables in the sed command, but if I u
Palmer I'm trying to export characters from a reference file whose byte positions are known. For this, I have a long string of numbers stored as variables, which are used as input to tail commands. For example, the reference file looks like this: ggaaatgcattca
Mayur Sawant I am using this command to copy certain lines from one file to another and it is working fine without issue. sed -f <(sed -e '1,10d; 12,$d; x; s/.*/10a\/;p; x' ../log/file2.txt ) ../log/file4.txt > ../log/file5.txt
The problem is that instead of
Palmer I'm trying to export characters from a reference file whose byte positions are known. For this, I have a long string of numbers stored as variables, which are used as input to tail commands. For example, the reference file looks like this: ggaaatgcattca
Vasyl Kozhushko I wrote a piece of code and it works fine, but I need to use variables instead of static numbers in ranges 8 and 16 cat /etc/passwd | sed '/^#/d' | sed -n 'n;p' | sed 's/:\(.*\) //g' | sed 's/ /,/g' | sed 's/\(.*\),/\1./' | sort -r | sed 's/*ra
Palmer I'm trying to export characters from a reference file whose byte positions are known. For this, I have a long string of numbers stored as variables, which are used as input to tail commands. For example, the reference file looks like this: ggaaatgcattca
Palmer I'm trying to export characters from a reference file whose byte positions are known. For this, I have a long string of numbers stored as variables, which are used as input to tail commands. For example, the reference file looks like this: ggaaatgcattca
Winemaker 15 The goal of my script is to get input from the user how much time they want before closing, and the message they want to display during the closing process. My problem is that I can't figure out exactly how to put the variable into the shutdown co
Dmitry Kurlyanov It has been executed setx /m DESKTOP %UserProfile%\Desktop
actual results set DESKTOP
DESKTOP=C:\Users\dkurlyanov\Desktop
desired result set DESKTOP
DESKTOP=%UserProfile%\Desktop
I'm only interested in options via console Dmitry Kurlyanov C
Dmitry Kurlyanov It has been executed setx /m DESKTOP %UserProfile%\Desktop
actual results set DESKTOP
DESKTOP=C:\Users\dkurlyanov\Desktop
desired result set DESKTOP
DESKTOP=%UserProfile%\Desktop
I'm only interested in options via console Dmitry Kurlyanov C
Dmitry Kurlyanov It has been executed setx /m DESKTOP %UserProfile%\Desktop
actual results set DESKTOP
DESKTOP=C:\Users\dkurlyanov\Desktop
desired result set DESKTOP
DESKTOP=%UserProfile%\Desktop
I'm only interested in options via console Dmitry Kurlyanov C
Dmitry Kurlyanov It has been executed setx /m DESKTOP %UserProfile%\Desktop
actual results set DESKTOP
DESKTOP=C:\Users\dkurlyanov\Desktop
desired result set DESKTOP
DESKTOP=%UserProfile%\Desktop
I'm only interested in options via console Dmitry Kurlyanov C
Dmitry Kurlyanov It has been executed setx /m DESKTOP %UserProfile%\Desktop
actual results set DESKTOP
DESKTOP=C:\Users\dkurlyanov\Desktop
desired result set DESKTOP
DESKTOP=%UserProfile%\Desktop
I'm only interested in options via console Dmitry Kurlyanov C
Mahendran To start my project in windows I have to set java environment variables in cmd using set JAVA_HOME = D:\Java\jdk1.7.0
But it didn't set the environment variable, I didn't know the problem was after a few hours, I found out the reason was the whitesp
Andrew I am new to using ProcessBuilderobjects to run commands in Java . My problem is that when I put the environment variable in builder.command(...)the method it doesn't work. However, when I hardcode the string of the environment variable, it works fine. B
Mahendran To start my project in windows I have to set java environment variables in cmd using set JAVA_HOME = D:\Java\jdk1.7.0
But it didn't set the environment variable, I didn't know the problem was after a few hours, I found out the reason was the whitesp
Mahendran To start my project in windows I have to set java environment variables in cmd using set JAVA_HOME = D:\Java\jdk1.7.0
But it didn't set the environment variable, I didn't know the problem was after a few hours, I found out the reason was the whitesp