I have written my convert.sh shell This is my working directory All executables and libraries are here, including tsmp. But when I run my script It seems that I do not understand alias. Following chepner’s comments,I have tried this But Why? Answer tsmp is not in your PATH environment variable, so you have to be explicit about where it is:
Tag: shell
script to change format of text [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 7 years ago. Improve this question I want to change a text file that contains for example : a 1 b 2 a 3 b 4 to: a b 1 2
Howto read result of command lspci each line as an element of array?
I’d like to have video card information from my target system, no matter what it is. There are two lines returned from my current target system, and I’d like to treat each line as an element of array. Using the code below, I got every word from lspci result rather than whole line which is what I need. Any idea?
‘exec(): Unable to fork’ on Ubuntu 14.04.3 LTS
I’m running unittest scripts and for test case setup I need to run shell command from time to time. As a result shell command is run around 50 times during unittest execution. It works ok on CentOS release 6.6 (Final) server but doesn’t work on Ubuntu 14.04.3 LTS. The problem is that after around 20th time shell script execution I
Sort file based on information from different file
I have a file (f1) that contains two columns; f1 looks as follows: In a different file (f2), I specify how I would like individuals in f1 to be sorted based on their population; f2 looks as follows: I am looking for the following outcome: Could anyone please give me advice on how to achieve this outcome? Answer You can
Combining input and output shell IO redirection (in a nonstandard order)
What would this shell command do? And in general, how is this different from the other order of using < and >? When can it be used? I ask because I can only find examples of the other order (./myprog < myinputs.txt > myoutputs.txt which straightforwardly takes in the contents of myinputs.txt and writes the result of running ./myprog on
How to read and update(increment) a value in a file with shell commands
I have a certain file which contains many contents, including a line from the format (for example) ABC = “x12” What I need to do is to increment the value, so that after the command it will be ABC = “x13” The file itself needs to be updated, no need to create a new file or something similar. I would
Programatically activate and deactivate network interfaces using nmcli
I wrote a script that deactivates all the interfaces available using nmcli commands such as: I would now like to reactivate these interfaces; there is no nmcli dev connect iface … command, and I’m stuck. In particular, my problem is to reactivate the Ethernet interface. Thanks in advance for your help! Answer Use this command: You can also use uuid
How can I *only* get the number of bytes available on a disk in bash?
df does a great job for an overview. But what if I want to set a variable in a shell script to the number of bytes available on a disk? Example: But I just want to return 33333333 (bytes available on /), not the whole df output. Answer Portably: The -P option ensures that df will print output in the
Combining two bash commands
If found this code which gives pi Ip address and this which sends 1.2.3.4 off to dweet.io stream How can I get the output from 1st to replace the 1.2.3.4 in second please? Answer Save the output of the first command in a variable: Btw, if your raspberrypi is running raspbian, then a much cleaner way to get the IP