KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am trying to use find -exec with multiple commands without any success. Does anybody know if commands such as the following are possible? find *.txt -exec echo "$(tail -1 '{}'),$(ls '{}')" \; Basically, I am trying to print the last line of each txt file in the current directory and print at the end of the line, a comma followed by the filename.
Tags (comma-separated)
Save Edits
Cancel