Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Can I kick out a 'echo $@' outside and before a function for/do loop?
Post Flair (click to view more posts with a particular flair)
Post Body

So I created a function that works for 1 file or multiple with wildcards. Passing the file name(s) to mv (alias=pymv). Since it's a loop though pymv only knows of 1 file at a time so I get a bunch of (1/1) moves which unless someone knows how to pass all $1 into it I'm ok with but is it possible to get a 'echo $@' at the beginning of the mv so I know how many actions to expect and when it'll finish?

function mvt() { for i in "$@"; do mv "$i" "$temp"; done ;}

This came close but it echos right above each mv and pymv clobbers the line above it so it disappears immediately lol.

function mvt() { for i in "$@"; do echo "Moving $@ Items"; mv "$i" "$temp"; done ;}

Author
Account Strength
90%
Account Age
9 years
Verified Email
Yes
Verified Flair
No
Total Karma
4,174
Link Karma
215
Comment Karma
3,959
Profile updated: 3 days ago
Posts updated: 3 days ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
5 years ago