Search Results

Search: Posts Made By: f77hack
1,802
Posted By f77hack
@bakunin yes, this is exactly what i was looking...
@bakunin yes, this is exactly what i was looking to do.

Thank you.

P.S. How would expand the script if instead of "somefile" but an array of "somefiles=()"? Would you spawn off gfind?
1,802
Posted By f77hack
Thanks for help. All of the sed is basically...
Thanks for help.

All of the sed is basically a large 'OR' boolean.

Any particular file, could have any sed condition, 1..."#conditions", so the the sed needs to search for a condition in the...
1,802
Posted By f77hack
Optimizing find with many replacements
Hello,

I'm looking for advice on how to optimize this bash script, currently i use the shotgun approach to avoid file io/buffering problems of forks trying to write simultaneously to the same...
2,003
Posted By f77hack
Sweet! Thanks.
Sweet! Thanks.
2,003
Posted By f77hack
Checking and replacing first line in text file, one-liner?
Hello,
I'm looking to check only the first line of a file to see if it is a format string, like

# -*- coding: utf-8; mode: tcl; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -\*-...
2,372
Posted By f77hack
Thanks for the comments. Yes, I tried some...
Thanks for the comments.

Yes, I tried some long, really off-the-wall, random arrays that would be equivalent to a messy json structure and the simple regex easily beat the recursion.

Good idea...
2,372
Posted By f77hack
Fastest alternatives to flattening a non-uniform nested array with regex?
Hello,

I'm looking at simplfying a function that flattens an array, it uses recursion and filters objects by type but this seems to be a waste of resources to me at least, using conditionals like...
Forum: Programming 03-23-2018
3,476
Posted By f77hack
Hello Robin, that definitely helps. The...
Hello Robin, that definitely helps. The original code is swift but I don't mind if code is bash, perl... I just need to see some code that works.
Thank you.

---------- Post updated at 03:34 PM...
Forum: Programming 03-22-2018
3,476
Posted By f77hack
Code review: recursion in circular array, reduce two functions to one?
Hello,
I think there's an easier way to do this but can't seem to recall but given an array of animals[0...5] and an initial value is a random index in the array, here it's 3.
...
9,044
Posted By f77hack
Thanks. Inside the sed command is '\n' which...
Thanks. Inside the sed command is '\n' which inserts a new line. So I really don't get your point, the string is added on a new line if the searchString is not found. DId I misunderstand your...
9,044
Posted By f77hack
Sed/grep: check if line exists, if not add line?
Hello,
I'm trying to figure out how to speed up the following as I want to use multiple commands to search thousands of files.

is there a way to speed things up?

Example I want to search a...
1,709
Posted By f77hack
yes sorry, my mistake, right parenthesis.
yes sorry, my mistake, right parenthesis.
1,709
Posted By f77hack
Documenting files with sed
All,
I am looking for a way to improve this small one liner.

one of the files has this kind of format
public func <<<T>(array: [T], offset: Int) -> [T] { return array.shiftedLeft(by: offset) }...
Forum: OS X (Apple) 03-25-2017
5,477
Posted By f77hack
but you will stuff if it's buried in a places...
but you will stuff if it's buried in a places like .cpan .R .conda
1,561
Posted By f77hack
Perl:: Arrays w/ UInt64.max>index>Int64
Where is the delete or remove post option?
1,550
Posted By f77hack
Many thanks. This is what I was looking for,...
Many thanks. This is what I was looking for, general rule of thumb.
1,550
Posted By f77hack
Shells, forks, subprocesses... oh my
all,
i've been reading to try and get an abstract idea of the process effeciency of commands , sed, bash, perl, awk, find, grep, etc

which processes will spawn?, fork?, launch subshell?, etc and...
1,353
Posted By f77hack
Thanks for the help. Ok, if it's an video...
Thanks for the help.

Ok, if it's an video file *.mp4, the video gets shoved into a long ffmpeg command line to do some heavy duty processing, crop, noise reduction, pixel conversion, etc. I probe...
1,353
Posted By f77hack
Anyone have better way to remove ls from this function?
all,

i have this script which grabs the number of files to process and displays the percent done as the loop works. i'm never sure how many files will need to be processed.

let k=1
tot=$( ls...
1,850
Posted By f77hack
Thanks, that worked.
Thanks, that worked.
1,850
Posted By f77hack
OSX: find,xargs guru?
hello,

bash 4.2+
osx 10.11.6

i looking for a nice compact one-liner and need a little help using find and xargs

i'm writing a script to recursively search through directories looking for...
23,535
Posted By f77hack
Because when i grep from the command line i don't...
Because when i grep from the command line i don't want to have to type in this every time.

'-irs --color=always --line-number --exclude-dir=.git'

if i did an alias, it could easily be stomped...
23,535
Posted By f77hack
Grep: a better way to temporarily disable colors?
i was just using gnu grep

grep (GNU grep) 2.20


and when running a command i kept getting really weird results, namely that eval and echo and various combinations would not run the command
...
7,862
Posted By f77hack
Perl:: mass replacement of converting C code formats to tgmath.h
hello,

i have a lot of C old code I'm updating to C11 with tgmath.h for generic math. the old code has very specific types, real and complex, like cabsl, csinhl, etc

usually for simple bulk...
13,970
Posted By f77hack
why don't you put the mandatory ones at the...
why don't you put the mandatory ones at the beginning? then throw into a while loop? this chokes off any continuation rather than repeating the loop.
Showing results 1 to 25 of 28

 
All times are GMT -4. The time now is 02:13 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy