You can use awk the following way:
ls -all my_directory/* | awk '{print $9}'
This will only print the filename.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-04-07 12:04:10 +0000
Seen: 21 times
Last updated: Apr 07
How can the number of backslashes be doubled using various versions of `awk`?
Why is awk -i inplace not functioning properly when used within a script?
How can a customized trigger be established for RabbitMQ queues in Zabbix?
Can you extract certain values located between columns in two separate csv files using Grep?
What is the Grep command that can be used to extract a section of the last line?
How can you print a range of columns in awk using a variable?
How can we use Bash to identify the directory that has been around the longest?
How can a decimal output be used in an if-else statement with an awk condition?