-1
votes
2answers
65 views

how to find number of substrings between delimiter? [closed]

I have the string following something(1)^^^something(2)^^^something(3)^^^ ... ^^^something(n) how to find number of something(s) in the string.
0
votes
1answer
270 views

Combining multiple data files with header while also adding a data column

I have multiple tab delimited data files that are separated by month in the format jan06.txt, feb06.txt, ..., dec07.txt. Within each file, it looks something like: Header1 Header2 Header3 ... Data1 ...
0
votes
1answer
2k views

How to append text to a specific lines in a file using shell script?

I have a text file (file.txt) having content something like: foo1 3464 foo2 3696 foo3 4562 It contains the process and respective PID. Using shell script, I want to append a string (running/not ...
4
votes
1answer
1k views

How do I parse file paths separated by a space in a string?

Background: I am working in Automator on a wrapper to a command line utility. I need a way to separate an arbitrary number of file paths delimited by a single space from a single string, so that I may ...
2
votes
1answer
2k views

How can I automate modifying key/value pairs in a shell script?

I often want to automate this sort of task in a shell script: if the line: SOMEKEY=SOMEVALUE exists in a file, then change it to SOMEKEY=SOMEOTHERVALUE otherwise, append the line ...
0
votes
1answer
469 views

Command line solution for removing parts from a binary file?

I have a binary file and I would like to remove parts from. By removing I mean deleting those parts and thus making the file's size smaller. The parts would be between two ASCII strings. So, for ...