Jump to content

Unix Shell Script Help


Recommended Posts

  • Replies 35
  • Created
  • Last Reply

Top Posters In This Topic

  • chinni005

    14

  • sigsegv

    5

  • apple

    4

  • micxas

    3

Top Posters In This Topic

Posted

one by one copy cheyochu kada...5 files at a time ante idhe try chey

for i in 'cat SOURCE'
do

cp $i DESTINATION

done

trying..

Posted

help help

 

 

oka file lo Data ni sort unique cheyyali..  any idea?

 

 

Posted

help help

 

 

oka file lo Data ni sort unique cheyyali..  any idea?

inko thread esko po.. I Hate You

Posted

help help

 

 

oka file lo Data ni sort unique cheyyali..  any idea?

sort -u filename -o filename

Posted

is it single time copy job ?

planning to run as cron job at a particular time of day ?

 

why 5 files at a time ? why not copy all the files ?

 

evvi chepte...ne req enka clarity ga untadii

Posted

is it single time copy job ?

planning to run as cron job at a particular time of day ?

 

why 5 files at a time ? why not copy all the files ?

 

evvi chepte...ne req enka clarity ga untadii

file size peddavi ayyiuntaayi ..

Posted

is it single time copy job ?
planning to run as cron job at a particular time of day ?

why 5 files at a time ? why not copy all the files ?

evvi chepte...ne req enka clarity ga untadii

Yeah cron job lo e script ni every 15mins ki run chryyali
Just 5 files for best performance .. Anni files move chesthe too much load.. So help
Posted
#!/bin/bash
eval "sorted_files=($(ls -tr --quoting-style=shell-always /source))"
mv -- "${sorted_files[@]:0:5}" /dest/
 
-----------------------------------------------
"/source" --> ur source dir
"/dest" --> ur dest dir
 
 
 
 
Posted

na task cheptha complete ga.. Ivala meeting lo change chesaru koncham..

Say SRC has 50 files, My script has to pick only one xml file at a time and should put it in DEST. Say even though 50 files are of diff extension like .cvs, .pdf, .xml, script has to pick up only xml files...

Thanks a lot for your time!!

×
×
  • Create New...