Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 3 years ago. Improve this question I need to convert 1.22661727081984E+002 to 122.661727081984 using shell script. I have tried
Tag: shell
Why does the file in a subdirectory not get copied?
I have to make a script which will copy all files from a certain location starting with “db.” to another location. My script works fine for all files which are directly in the directory, but it doesnt copy any files which are in subdirectorys. I have used the parameter -r, which should copy everything recursivly or not? Why isnt it
How do I copy files in the same directory with a number changed of filename
I would like to copy mutiple files using patterns for a new file name. For example: How do I copy these files into the following filename automatically using bash-script? Many thanks Answer This copies all files in the current directory, replacing 1 with 2. It’s not really useful as it serve a very specific purpose and is not very reusable,
How to get output of function_1 into function_2 in shell scripting?
Suppose output of funtion_1: Question 1: Mark :5: Question 2: Mark :1: Question 3: Mark :3: Suppose function_2 needs to extract integer from function_1 output to calculate total mark. How to give output of function_1 to funtion_2? Answer Try this code: FILE_NAME=marks.txt function_1() { echo $(grep “Mark” $1) } function_2() { var=”$@” echo $var #TODO: extract integers } ret=$(function_1 $FILE_NAME)
Unable to use grep for a command and excecute the shell script?
I have created a shell script to execute 5 commands from a file called elist.txt The shell script is as follows output: Answer You can do this too. People usually do not recommend to use eval at all. Regards!
How to access local variables in remote server using ssh [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 3 years ago. Improve this question I am trying to access my local variable in remote server. Which command should I use. Ex. cmd: REMOTE SERVER: output should get 2. Answer
shell linux don’t execute commande
I have this command and it works fine on shell. I want to run it with php but it does not work what i missed : edited : $arg=”arg1″; $arg2= “arg2”; after this change no error on output but still commande not executed edited : the original commande is like this : and i want to around the probleme with
How to use Grep commands to find specific value in text file
I need to grep a file called daily_fails_count.csv but only find the number of failures. Inside that file is this, on a shorter scale: It’s format is “month,day,hours,failures.” It goes through all months. The last value is the number of failures found at that time. I know here it all says 0 but that’s because no failures were found there,
AWK with commands [closed]
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations. Closed 3 years ago. Improve this question I’m learning in Linux and my senior give me a task
Linux bash ‘[: -ge: unary operator expected’ error
I tried this code and it gives many errors that could anyone help me to fix this problem please. Answer The source of the problem reported in the question is an empty decvalue as syme has already stated. Considering the purpose of the script, it seems you attempted to write a recursive function. For this reason, i suggest you to