SEOClerks

Need a shell script written

Need a shell script written

I need a bash script that could do the following things:
1) Sort the files in a folder according to their extension. For example if i run the script like this: .sort.sh jpg gif
then it would create a jpg and a gif folder and move the files to the right folder.

2) The script also needs to create a log file with the list of the moved files and the name of the folders where each file were moved.

3) If i run the script without specifying the extensions, then it should show short how to use message.

I also need the same scrip written in Powershell. Please check out my other gig if your interested.


Requirements

Experience with Shell Script


Skills Required

Shell Script Writing

Bids

i can have both of these scripts ready for delivery within the next 24 hours. each script will record its activity to a log file upon completing each sort as requested.

you execute ./sortimages
and it will a find images in path you input or in path this script is in
it will record all image pathes into a log file
it will move or copy gif to gif folder, jpg to jpg folder png to png folder

Bid On Listing Created 11 years ago in Programming

Other jobs by lapsang

Order Now
Process Time: 0.18179488182068

Possible Duplicate queries found!
MatchCountSQLScript
SELECT * FROM wanttobuy A, categories_wanttobuy B, seoclerks.members C WHERE A.wantid='21530' AND A.category=B.CATID AND A.USERID=C.USERID1SELECT A.*, B.name, B.seo, C.username, C.userlevel, C.footer_code, C.rating, C.ratingcount, C.googleplus_profile, C.total_recommendations, C.USERID, C.profilepicture, C.average_response_time, C.lastlogin, C.addtime FROM wanttobuy A, categories_wanttobuy B, seoclerks.members C WHERE A.wantid='21530' AND A.category=B.CATID AND A.USERID=C.USERID

/opt/clerks-staging/docroot/viewwant.php 163 () ()

SELECT * FROM ratings_buyer WHERE USERID=2177221SELECT sum(good) as thumbup, sum(bad) as thumbdown FROM ratings_buyer WHERE USERID=217722

/opt/clerks-staging/docroot/include/functions/main.php 19523 GetRatingsAsBuyerTotal() ()

SELECT * FROM wanttobuy A, categories_wanttobuy B WHERE A.wantid != 21530 AND A.category=B.CATID AND A.active=1 AND (A.tags like '%Shell Script Writing%' ) LIMIT 41SELECT A.wantid, A.title, A.p1, A.maxprice, B.name, B.seo FROM wanttobuy A, categories_wanttobuy B WHERE A.wantid != 21530 AND A.category=B.CATID AND A.active=1 AND (A.tags like '%Shell Script Writing%' ) LIMIT 4

/opt/clerks-staging/docroot/viewwant.php 551 () ()

SELECT * FROM wanttobuy A, categories_wanttobuy B WHERE A.wantid != 21530 AND A.category=B.CATID AND A.active=1 AND A.USERID=217722 LIMIT 41SELECT A.wantid, A.title, A.p1, A.maxprice, B.name, B.seo FROM wanttobuy A, categories_wanttobuy B WHERE A.wantid != 21530 AND A.category=B.CATID AND A.active=1 AND A.USERID=217722 LIMIT 4

/opt/clerks-staging/docroot/viewwant.php 568 () ()

SELECT * FROM wantcomments a, seoclerks.members b WHERE a.PID='21530' AND a.USERID=b.USERID and b.status='1' AND a.status=1 order by a.CID asc1SELECT a.comment, a.USERID, a.CID, a.time_added, a.istranslated, a.parentid, b.username, b.profilepicture FROM wantcomments a, seoclerks.members b WHERE a.PID='21530' AND a.USERID=b.USERID and b.status='1' AND a.status=1 order by a.CID asc

/opt/clerks-staging/docroot/viewwant.php 835 () ()

UPDATE wanttobuy SET viewcount = viewcount + 1 WHERE wantid='21530'1UPDATE wanttobuy SET viewcount = viewcount + 1 WHERE wantid='21530'

/opt/clerks-staging/docroot/include/functions/main.php 1729 update_wantviewcount() ()

SELECT * FROM wantbids as w, seoclerks.members AS m WHERE w.active=1 AND m.USERID=w.USERID AND m.status=1 AND w.USERID>0 AND w.wantid='21530' ORDER BY w.bidid ASC 1SELECT w.bidid, w.PID, w.comment, w.title, w.pricepublic, w.USERID, w.adjustedprice, w.ip, m.profilepicture FROM wantbids as w, seoclerks.members AS m WHERE w.active=1 AND m.USERID=w.USERID AND m.status=1 AND w.USERID>0 AND w.wantid='21530' ORDER BY w.bidid ASC

/opt/clerks-staging/docroot/viewwant.php 1192 () ()

SELECT * FROM seoclerks.members as m WHERE m.USERID=2793141SELECT m.username, m.skills, m.userlevel, m.ip, m.total_recommendations FROM seoclerks.members as m WHERE m.USERID=279314

/opt/clerks-staging/docroot/viewwant.php 1258 () ()

SELECT * FROM seoclerks.members as m WHERE m.USERID=224141SELECT m.username, m.skills, m.userlevel, m.ip, m.total_recommendations FROM seoclerks.members as m WHERE m.USERID=22414

/opt/clerks-staging/docroot/viewwant.php 1258 () ()

SELECT * FROM categories_wanttobuy1SELECT * FROM categories_wanttobuy

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() parseRedundantQueriesCache()

SELECT * FROM posts WHERE USERID=2177221SELECT sum(positive_ratings) as thumbup, sum(negative_ratings) as thumbdown FROM posts WHERE USERID=217722

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() GetBuyerRatingsTotal()

SELECT * FROM categories1SELECT * FROM categories

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() parseRedundantQueriesCache()

select * from categories_software order by name asc1select * from categories_software order by name asc

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_GetSoftwareCategories()

select * from categories_wanttobuy order by name asc1select * from categories_wanttobuy order by name asc

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_wantcategories()

select * from categories_wanttotrade order by name asc1select * from categories_wanttotrade order by name asc

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() insert_get_tradecategories()

SELECT * FROM seoclerks.members WHERE USERID='279314'1SELECT profilepicture FROM seoclerks.members WHERE USERID='279314'

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() getUserProfileImage()

SELECT * FROM seoclerks.members WHERE USERID='22414'1SELECT profilepicture FROM seoclerks.members WHERE USERID='22414'

/opt/clerks-staging/docroot/libraries/adodb5/adodb.inc.php 1899 CacheExecute() getUserProfileImage()

SELECT * FROM seoclerks.members WHERE USERID='217722'1SELECT profile_data FROM seoclerks.members WHERE USERID='217722'

/opt/clerks-staging/docroot/include/functions/main.php 1927 getUserBackground() include()

Invalid SQL

count(*)sql1error_msg

Expensive SQL

Tuning the following SQL could reduce the server load substantially
LoadCountSQLMaxMin

Suspicious SQL

The following SQL have high average execution times
Avg TimeCountSQLMaxMin
0.1406171SELECT A.*, B.seo, B.name as categoryname, C.username, C.userlevel, C.lastlogin, C.ip, C.profilepicture FROM wanttobuy A, categories_wanttobuy B, seoclerks.members C WHERE A.active = 1 AND A.category = B.CATID AND A.USERID = C.USERID AND (A.tags LIKE '%Legit%' OR A.skills LIKE '%Legit%') ORDER BY A.lastgigedit desc LIMIT 0,400.1406170.140617
0.1193121SELECT COUNT(A.wantid) AS total FROM wanttobuy as A, categories_wanttobuy B, seoclerks.members C WHERE A.active = 1 AND A.category = B.CATID AND A.USERID = C.USERID AND (A.tags LIKE '%Legit%' OR A.skills LIKE '%Legit%')0.1193120.119312
0.1042531SELECT A.wantid, A.title, A.p1, A.maxprice, B.name, B.seo FROM wanttobuy A, categories_wanttobuy B WHERE A.wantid != 21530 AND A.category=B.CATID AND A.active=1 AND (A.tags like '%Shell Script Writing%' ) LIMIT 40.1042530.104253
0.0979191SELECT * FROM members WHERE show_freelancer = 1 AND status = 1 AND total_recommendations > 0 AND (skills LIKE '%message%') ORDER BY total_recommendations desc LIMIT 0,400.0979190.097919