Search found 271 matches

by Burunduk
Fri Apr 11, 2025 8:59 pm
Forum: Programming
Topic: Different configs utilizing bat/cat for either xorg or console-noX [HALF SOLVED]
Replies: 7
Views: 213

Re: Different configs utilizing bat/cat for either xorg or console-noX [HALF SOLVED]


My question: Is it possible to either put a test for the terminal environement in the scope.sh or use different config files for different tty logins, like one config file for tty1, and another for tty2?




You could probably test the $DISPLAY variable (if your system uses the X server ...
by Burunduk
Fri Apr 11, 2025 7:47 pm
Forum: Security
Topic: Does Puppy "Phone Home"? (Solved)
Replies: 10
Views: 512

Re: Does Puppy "Phone Home"?



Fossapup-9.5?

/root/Startup/PPMupdatedatabase - delete or move from the Startup directory if you don't need it.


I renamed the file PPMupdatedatabase.old and it still downloads 15.1MB about a minute after boot. Is there a way to see where and what it downloads?


PPMupdatedatabase does ...
by Burunduk
Tue Apr 08, 2025 11:19 pm
Forum: Software
Topic: Double Commander (file manager)
Replies: 8
Views: 944

Re: Double Commander (file manager)

Code: Select all

touch file{1..5}.txt
mkdir links
ln -sr *.txt links

It should be possible to add this as a custom button.

Something like: command ln; parameters -sr %f %Dt.

But I don't have DC installed to test it.

by Burunduk
Mon Mar 31, 2025 7:50 pm
Forum: Security
Topic: Does Puppy "Phone Home"? (Solved)
Replies: 10
Views: 512

Re: Does Puppy "Phone Home"?

Fossapup-9.5?

/root/Startup/PPMupdatedatabase - delete or move from the Startup directory if you don't need it.

by Burunduk
Wed Mar 12, 2025 7:11 pm
Forum: BookwormPup
Topic: Does anyone have a work-around for the right-click file handling behavior in Rox? [unresolved]
Replies: 74
Views: 2542

Re: Does anyone have a fix for the right-click file handling error in Rox?


Yes, Xfe works the same as Rox, in other words, a file is selected, but a right click on another file does not un-select the previously selected file, it brings up an action menu that will operate on all selected files, which means the previously selected files and the file that was right-clicked ...
by Burunduk
Tue Mar 11, 2025 4:05 am
Forum: Browsers and Internet
Topic: Sealion browser
Replies: 8
Views: 772

Re: Sealion browser

It's probably from here: https://github.com/wicknix/SeaLion

by Burunduk
Mon Mar 10, 2025 12:03 pm
Forum: Programming
Topic: Check which folders have been added to AUFS?
Replies: 6
Views: 638

Re: Check which folders have been added to AUFS?

Once upon a time I wrote a script that shows the order of the loaded sfs files. Maybe you'll be able to adapt it to your needs. At least you'll know where the info about the aufs branches comes from.

by Burunduk
Fri Mar 07, 2025 7:05 pm
Forum: Users Help
Topic: bulk remove part of a file name using find command, How?(SOLVED)
Replies: 19
Views: 1787

Re: bulk remove part of a file name using find command, How?


How is it doing two substitutions at once?


It doesn't. It makes only one substitution:

(\.MP)? - match ".MP" if possible, match "" (an empty string) otherwise (there always is an empty string in between any two adjacent characters)

\. - match "."

(JPEG|jpg) - match "JPEG" OR "jpg"

$ - at ...
by Burunduk
Wed Mar 05, 2025 6:14 pm
Forum: Users Help
Topic: bulk remove part of a file name using find command, How?(SOLVED)
Replies: 19
Views: 1787

Re: bulk remove part of a file name using find command, How?


~/test$ find . -type f -iname '*.MP.jp*' -exec rename .MP. . '{}' \;
syntax error at (user-supplied code), near "."
syntax error at (user-supplied code), near "."
~/test$


MochiMoppel is using a different command - rename from util-linux.

Your rename is a perl script. With it, this should ...
by Burunduk
Mon Feb 17, 2025 10:45 am
Forum: Scripts
Topic: Using YAD Simple Progress Bar
Replies: 32
Views: 9826

Re: Using YAD Simple Progress Bar

Not helpful, just another option...

Code: Select all

#!/bin/bash

for ((i=0; i<=100; i+=5)); do
  echo $i
  sleep 1
done | Xdialog --title Unpackit --gauge "Extracting..." 5 30
by Burunduk
Sun Feb 16, 2025 4:38 pm
Forum: Scripts
Topic: Using YAD Simple Progress Bar
Replies: 32
Views: 9826

Re: Using YAD Simple Progress Bar


or
#!/bin/bash
SECONDS=0
while :; do
date -ud @$SECONDS +$((SECONDS%60*10/6))$'\n#%T'
sleep 1
done | yad --center --progress --text=timer



Ah, yes!

#!/bin/bash
# or busybox ash

s=0
while :; do
date -ud @$s +\#%T
echo $((s++%60*10/6))
sleep 1
done | yad --center --progress --text=timer ...
by Burunduk
Sun Feb 16, 2025 12:21 pm
Forum: Scripts
Topic: Using YAD Simple Progress Bar
Replies: 32
Views: 9826

Re: Using YAD Simple Progress Bar

#!/bin/bash

s=0
while :; do
printf '%d\n#%02d h %02d m %02d s\n' $((s%60*10/6)) $((s/3600)) $((s/60%60)) $((s++%60))
sleep 1
done | yad --center --progress --text=timer


or

#!/bin/bash

st=$(date +%s)
while :; do
s=$(($(date +%s)-st))
echo $((s%60*10/6))
date -ud @$s +\#%T
sleep 1
done ...
by Burunduk
Mon Feb 03, 2025 3:28 pm
Forum: BookwormPup
Topic: Firefox issue with active field and focus indicator (highlight) [CLOSED]
Replies: 35
Views: 6463

Re: Firefox issue with active field and focus indicator (highlight) [CLOSED]

It's not a fix but it might be useful:

  • choose a folder

  • press CTRL-L

  • enter a filename

This shortcut is commonly used in various apps (also in Firefox itself) to give the focus to the address bar.

by Burunduk
Mon Dec 23, 2024 5:54 am
Forum: Off-Topic Area
Topic: Merry Christmas and Happy New Year.
Replies: 12
Views: 1442

Re: Merry Christmas and Happy New Year.

Merci, Sonia, it's one of the most beautiful greeting cards I've ever seen.

Joyeux Noël ! Bonne année, bonne santé !

by Burunduk
Fri Nov 29, 2024 1:04 pm
Forum: Users Help
Topic: tar is being annoying [Solved]
Replies: 3
Views: 314

Re: tar is being annoying

--newer-mtime ?


The ‘--after-date=date’ (‘--newer=date’, ‘-N date’) option causes tar to only work on files whose data modification or status change times are newer than the date given.
...
If you want tar to make the date comparison based only on modification of the file’s data (rather than ...
by Burunduk
Sat Nov 23, 2024 11:30 am
Forum: Filesystem
Topic: F2 - Command-line batch renaming tool
Replies: 16
Views: 3999

Re: F2 - Command-line batch renaming tool

The bug has been fixed, the author has noticed it himself without a report.

New version - f2 2.0.3

Fix bug caused by space trimming in `--find`, `--replace`, `--exclude`, and `--exclude-dir`

---


I do see problems when using curly brackets in combination with f2's placeholders, which also ...
by Burunduk
Fri Nov 22, 2024 3:38 pm
Forum: Filesystem
Topic: F2 - Command-line batch renaming tool
Replies: 16
Views: 3999

Re: F2 - Command-line batch renaming tool

MochiMoppel
No offense, of course. Just failed to spot an evidence of constructive approach in your initial reaction. Thanks for the clarification.
I've found f2 to be a very useful tool. Otherwise I wouldn't care to download the go compiler, especially with my limited plan. Not that the GUI ...
by Burunduk
Fri Nov 22, 2024 1:44 pm
Forum: Filesystem
Topic: F2 - Command-line batch renaming tool
Replies: 16
Views: 3999

Re: F2 - Command-line batch renaming tool


Bad news: it has a bug/regression that prevents replacing spaces with underscores or vice versa. f2 -f " " -r "_" doesn't work anymore.
Replacing spaces with underscores works when using octal instead of literal space : f2 -f '\40' -r '_' , however replacing underscores with spaces seems not to ...
by Burunduk
Fri Nov 22, 2024 10:24 am
Forum: Filesystem
Topic: F2 - Command-line batch renaming tool
Replies: 16
Views: 3999

Re: F2 - Command-line batch renaming tool

In fact f2 is designed for more complex renaming tasks.

It's a new version again - 2.0.1

Good news: the natural sorting has finally been added.

Bad news: it has a bug/regression that prevents replacing spaces with underscores or vice versa. f2 -f " " -r "_" doesn't work anymore.

The reason is ...
by Burunduk
Wed Nov 20, 2024 7:07 am
Forum: Scripts
Topic: grep using a variable (Solved)
Replies: 15
Views: 1964

Re: grep using a variable (Solved)


... i even change ' to " but no results



You've got an error - this is a result too.

' and " are quite different in bash.

'$var' is just a literal string, no expansion happens;

'a\' is OK but "a\" is wrong - the backslash escapes the quote, it should be "a\\" ;

Do you expect me to guess ...
by Burunduk
Mon Nov 18, 2024 12:23 pm
Forum: Scripts
Topic: grep using a variable (Solved)
Replies: 15
Views: 1964

Re: grep using a variable

AntonioPt wrote: Sun Nov 17, 2024 10:03 pm

im using this sed but aint working since gonna add in all names

You can limit the range of lines where sed will search for a "Name=":

Code: Select all

sed -i -e '/^\[.*Entry/,/^\[/{/^Name=/a\' -e "the line you want to add" -e '}' sample.desktop
by Burunduk
Tue Nov 05, 2024 11:54 pm
Forum: Programming
Topic: Parsing how question
Replies: 4
Views: 984

Re: Parsing how question


This would also work with bash/ash/dash but uses sed :
echo $OLD | sed 's/false,/&\n/g' | sed -rn '/false,$/ s/(.*htm)(.*\/[^,]*)(.*)/\"htm\2,/p'


Just a note: this snippet works because the echo command outputs the whole thing as a single line.

For a multi-line input this sed command could ...
by Burunduk
Sat Aug 17, 2024 12:14 am
Forum: Programming
Topic: permutation combination by position number in bash?
Replies: 8
Views: 1296

Re: permutation combination by position number in bash?


I found this script and would like to find a specific combination by its number in the sequence.
If 4312 comes in position 23, can this combination be found just by calculating the sequence number 23 without comparing and running through all possible sequences?



Bash has a very limited support ...
by Burunduk
Wed Jul 31, 2024 11:35 pm
Forum: Programming
Topic: Assign command + options to a single variable?
Replies: 18
Views: 2217

Re: Assign command + options to a single variable?

MochiMoppel wrote: Wed Jul 31, 2024 10:43 pm

You've got "$@" parameters at the end of your command. Be aware that these are NOT the same parameters…

You've a point here! I was too lazy to actually test the functions (or even read the code carefully).

by Burunduk
Wed Jul 31, 2024 10:32 pm
Forum: Programming
Topic: Assign command + options to a single variable?
Replies: 18
Views: 2217

Re: Assign command + options to a single variable?


I see no repeating of that YAD command, so why in a function then ?

No repeating here too:
if grep -q 'Quirky April64' /etc/DISTRO_SPECS ||
grep -q 'puppy_tahr64' /etc/os-release ||
grep -q 'puppy_xenialpup' /etc/os-release ||
grep -q 'puppy_xenialpup64' /etc/os-release
then
set_library ...
by Burunduk
Sun Jul 28, 2024 6:29 pm
Forum: Beginners Help
Topic: pop up said there is a virus on your computer click here to remove.
Replies: 19
Views: 1873

Re: pop up said there is a virus on your computer click here to remove.

The popup window looks exactly like a firefox push notification . You've probably allowed them inadvertently.

There is a mozilla article that describes the feature and shows how to disable it.

Basically, you need to open the firefox settings page and then go to Privacy & Security -> Permissions ...
by Burunduk
Mon May 27, 2024 3:23 am
Forum: Scripts
Topic: how to properly exit bash?
Replies: 10
Views: 2326

Re: how to properly exit bash?


using a launch script which opens a terminal and calls [scriptname] script.


I'm using this launcher to run a script in a terminal. It's an excerpt from a bigger script that asks for confirmation before launching anything from the rox-filer. The terminal window stays open with an active bash ...
by Burunduk
Tue May 07, 2024 3:12 am
Forum: Scripts
Topic: How to handle carriage return input in sed?
Replies: 14
Views: 2438

Re: How to handle carriage return input in sed?

Code: Select all

CONTENT='line 1
line 2
line 3'

INSERTTEXT='extra line(s)\

'
echo "$CONTENT" | sed "3i $INSERTTEXT"

results in

Code: Select all

line 1
line 2
extra line(s)

line 3

---

citron means c itron that is change the content of every line to "itron".

by Burunduk
Mon May 06, 2024 4:08 am
Forum: Scripts
Topic: How to handle carriage return input in sed?
Replies: 14
Views: 2438

Re: How to handle carriage return input in sed?


This line handles the carriage return but adds a slash and space to the beginning of all inserted lines:

sed -i "${LINENUM}i\/ ${INSERTTEXT}" ${TASKS_DIR}"${*}"



A backslash is expected, not a slash. A literal newline is expected too:


sed -i "${LINENUM}i\\
${INSERTTEXT}" ${TASKS_DIR ...
by Burunduk
Wed May 01, 2024 5:51 pm
Forum: Scripts
Topic: terminal todo list
Replies: 33
Views: 5663

Re: terminal todo list


works like this:

root# todoinsert sMove

Current text:
1:shelves
2:drumheads
3:drum parts/hardware
4:electronics
5:guitars
6:computer/board

Type line number to insert text: 3
Enter text to insert: sticks and mallets

Updated text:
1:shelves
2:drumheads
3:sticks and mallets
4:drum parts/hardware ...

Go to advanced search