Xfce Forum

Sub domains
 

You are not logged in.

#1 2024-09-22 19:51:53

fixit
Member
Registered: 2015-01-19
Posts: 127

Get filename of multiple files

This works with single files but not multiple files.

Can I fix it?

basename %F > filename.txt && geany filename.txt && rm filename.txt


Ubuntu-Mate 24.04

Offline

#2 2024-09-24 03:11:59

Skaperen
Member
From: right by Jesus, our Saviour
Registered: 2013-06-15
Posts: 859

Re: Get filename of multiple files

i do not have a command named geany and have no idea what it does.  i have no idea what you want to get out of this.

my general approach to do some one thing to many files is to run a loop in a subshell like this:

(for filename in *;do ls -l "$filename";done)

the () to make a subshell are not literally required, but if a mistake is made, it is easier to kill what is going on, so i recommend having at least one subshell layer.

Last edited by Skaperen (2024-09-24 03:12:21)

Offline

Registered users online in this topic: 0, guests: 1
[Bot] CCBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.006 seconds, 7 queries executed - Memory usage: 516.09 KiB (Peak: 530.21 KiB) ]