Search Results

Search: Posts Made By: SriniShoo
2,340
Posted By Scrutinizer
@Srinishoo: The variable limitation is not in...
@Srinishoo:
The variable limitation is not in awk, nor is it a limitation of the shell, but rather an OS limitation determined by the configuration variable ARG_MAX ( getconf ARG_MAX ) .
Forum: OS X (Apple) 08-05-2014
5,064
Posted By wisecracker
A Bash Audio Sweep Generator...
This is a small program as a tester for a basic sweep generator for bandwidth testing of AudioScope.sh.

This DEMO is only capable of 4KHz down to about 85Hz and back due to the low bit rate, but...
Forum: Programming 07-23-2014
1,768
Posted By MadeInGermany
If the digits are on the same line, you can use...
If the digits are on the same line, you can use grep
if echo 123 | grep '\(.\).*\1' >/dev/null; then echo "Non-unique"; else echo "unique"; fi
if echo 112 | grep '\(.\).*\1' >/dev/null; then echo...
2,493
Posted By Scrutinizer
awk: awk '{A[$1]=$2; for(i in...
awk:
awk '{A[$1]=$2; for(i in A)if(!(i~"(^|\\+)" $1 "$")){c=i"+"$1; A[c]=A[i]+$2; print c, A[c]}}' FS=\| OFS=\| file

-- multiline --
awk '
{
A[$1]=$2
for(i in A) if(!(i~"(^|\\+)" $1...
1,838
Posted By Don Cragun
Instead of just removing the lock file, you might...
Instead of just removing the lock file, you might want to determine whether or not the script is still running.

A fairly common way to do this is to have the script that creates the lock file...
1,279
Posted By RudiC
Depending on your shell, might...
Depending on your shell, might do:DB_SID_SM=/opt/${DB_SID,,}/TEST/somepath
2,664
Posted By Don Cragun
This is a little bit simpler than SriniShoo's...
This is a little bit simpler than SriniShoo's script and seems to do what was requested (but it doesn't print the trailing spaces that were included in the expected results shown in the 1st message...
7,863
Posted By Don Cragun
There's no need for two substitute commands in...
There's no need for two substitute commands in the sed command. It can be done with one as in:
sed 's/ *| */|/g' "$FILE" > "$FLAT_FILE"
2,586
Posted By Don Cragun
You would make your life easier if you didn't put...
You would make your life easier if you didn't put spaces in filenames (like File 2), the filename fiel1 looks like a typo, and your output show lines matching cn=xyz, but the corresponding line in...
5,335
Posted By Don Cragun
With a million files to be removed, xargs rm will...
With a million files to be removed, xargs rm will not remove all of the files in one invocation of rm. Furthermore, if any of the files to be removed have names containing whitespace characters,...
3,410
Posted By Don Cragun
You also need to go back to single quotes (or do...
You also need to go back to single quotes (or do some more escaping) so you can use awk's interpretation of $0 instead of the shell's interpretation of $0. And, if a line could every be a string...
Showing results 1 to 11 of 11

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