Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers. Closed 3 years ago. Improve this question
Tag: unix
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
Undefined symbols for architecture x86_64: “_read_line”, referenced from: _insert in inventory-82371b.o
Here is the callback with -v and warnings suppressed. Here it is without warnings suppressed. But I don’t believe that they are causing the issue. Here is the code. It is a program for a very simple data base from a text book. I truly believe my problem is with the compiling. It’s been a while since I’ve used gcc
Renaming JSON files based on their contents
I have loads of geographical json files with date_geohash.json name format and I have to convert them to date_latitude-longotude.json format. For example I need to convert 2017-03-28_u13hhyn.json to 2017-03-28_N52.76-E1.62.json. I’m trying to write a bash script to rename these json files using ‘rename’ and ‘jq’ (json query) utilities. Using jq I can extract latitude and longitude from the json files.
[[ operator fails with error “conditional binary operator expected”
Linux bash script fails for the following line. Error message as given. I know i can simply use if [ -f file1.txt ] but curious to know what needs to be fixed to make this working. conditional binary operator expected expected `)’ Answer The mv command shouldn’t be inside the conditional expression, it’s a command that you want to execute
how ignore warnings to go in stderr
I’m run a command and I want to just get errors in stderr file not warnings I want to just get errors in error.txt,not warnings. I want this output: Answer You can filter the stderr if you want: Explanation: Redirect the stderr stream to command Copies lines containing ERROR to only-errors.txt file If you want to keep a copy of
I want to pipe the output of one script to different script that will process the output of the first script independently?
I have a very trivial bash script taking input from the user in the first step and then echo an output. I want to run the same script in different shells and let the first shell take input and echo its output and send it to the input of the other shell, and let the both of shells continue executing
How to split a single XML file into multiple based on tags
I have an XML file that have tags. I want to split files like this. Below is the code tried . But it is generating every single line into a new file I want to split this file based on ORDER tags alone as mentioned below Answer With any awk in any shell on every UNIX box: it’s obviously fragile
How to run a command on file in directory recursively creating a new file in each directory being visited (Bash)?
I have a directory with a few sub-directories. I’d like to create a copy of each results.csv file in the same directory named results_cleaned.csv where certain lines will be removed. Each sub-directory is known to contain only a single file, results.csv. Running this on a single directory works: However, running the same command on a root, produces just a single
SSHpass : to access local variable on remote host
Unable to access local variable on remote host using sshpass. Can you please help me to pass local variable to pass on remote host using ssh pass for the below code snippet expected result: Answer Try this: You need to double quote your command line and right escaping.