Linked Questions

0 votes
2 answers
385 views

I am trying to assign a variable to the result of a regex substitution in bash. For instance, when I run echo $initialvar | perl -pe 's/.+(Some_Dir\/)(.+)/\2/' I get the desired output from the echo....
Sos's user avatar
  • 1,959
-3 votes
1 answer
615 views

I created a very simple bash script. The first line of the script after #!/bin/bash accesses my vpn service using an OPENVPN file provided by the VPN Vendor. It works as expected and then waits for ...
user1980828's user avatar
1 vote
0 answers
48 views

Other than doing: $ ./script < myfile.txt Is there a way to pass text directly in the command-line, for example something like: ./script < "hello this is not a test" The program I ...
carl.hiass's user avatar
  • 1,814
-1 votes
2 answers
31 views

This is a sample code: var1 = float(input('Enter time interval: ')) print(f'OK, time interval is {var1}') # doing something with above variable I want to run this python file like this without ...
Saeed's user avatar
  • 4,175
30 votes
4 answers
67k views

Is there any way to get local variables within Terraform console? > local.name unknown values referenced, can't compute value Seems like Terraform console allows only to check input variables and ...
Tensho's user avatar
  • 923
15 votes
4 answers
47k views

Consider: command1 | command2 Is the output of command1 used as standard input of command2 or as command line arguments to command2? For example, cat test.sh | grep "hehe" What is its equivalent ...
Tim's user avatar
  • 101k
7 votes
2 answers
5k views

In Bash echo * is almost equivalent to ls. You can do things like echo */*-out/*.html > all-my-html-files-on-one-line Since * is a command line argument then there should be a limit on the ...
Aleksandr Levchuk's user avatar
6 votes
4 answers
6k views

I have an error popping up after upgrading to IBM MQ 8.0 from 7.5 reason being - In MQ 8.0, a new function is introduced that requires MQ administrators using remote access to supply the userid and ...
Ganesh Kumar's user avatar
5 votes
2 answers
4k views

I'm working with large variables and to speedup my script I'd like to awk or grep a variable without using echo/printf what I've tried: awk "/test/ {for(i=1; i<=100; i++) {getline; print}}" "$var"...
Orlo's user avatar
  • 828
-3 votes
1 answer
663 views

Sorry this is a very easy question, how do I print 0 from a shell script? My program is doing scanf for a number, I want the script to enter 0. I tried echo 0, it doesnt seem to work. #!/bin/bash ...
sublimesummer's user avatar
0 votes
1 answer
617 views

I wrote a C code which extracts data from a binary file which has size around 1 GB. There are 101 (0 to 100)configurations and the C code extracts data for a selected configuration and writes the ...
user3389597's user avatar
-1 votes
1 answer
382 views

I run a fortran program with bash: #!/bin/sh ./program and the program give three questions. How to give answers/arguments into bash script? I tried: #!/bin/sh echo "1 0 3,1.01" | program but the ...
Lukáš Altman's user avatar
0 votes
1 answer
259 views

Here is an example of how to compile a file: $lines = []; exec("lessc $file", $lines, $status); $output = implode("", $lines); I would like to compile just a string ideally without creating a ...
rtheunissen's user avatar
  • 7,435
-3 votes
1 answer
57 views

I need to run the script on Linux OS given by HPE in OVCs and I need to run this on almost all the nodes in all the federations. Hence I am writing one more small batch file to run that script which ...
Rachappa Chalmi's user avatar