Sponsored Content
Top Forums Shell Programming and Scripting File Download from Sharepoint folder Post 303001315 by Don Cragun on Tuesday 1st of August 2017 02:11:11 PM
Old 08-01-2017
Quote:
Originally Posted by Corona688
Code:
NAME=$(sort -r < list | head -n 1)

Since the year comes after the month and day in the timestamps in these filenames, the sort needs to be a little more complicated (and assuming that the filename prefix does not contains any other _s):
Code:
NAME=$(sort -r -t_ -k2.4,2.8 -k2.1,2.4 list | head -n 1)

assuming that there is only one filename before the underscore in your list. If there are multiple filename prefixes in your list, you'll need a loop something like:
Code:
last=
sort -t_ -k1,1 -k2.4,2.8r -k2.1,2.4r list | while IFS=_ read -r filename time
do	if [ "$last" = "$filename" ]
	then	continue
	fi
	curl other_parameters "$filename"_"$time"
	last="$filename"
done

Note that both of these (and the code suggested by Corona688) assume that list is the name of a file containing one line for each .xlsx file in your share point directory and that that line contains only that file's complete filename.
This User Gave Thanks to Don Cragun For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to download a folder

Hi all, If I want to download a whole directory from website on the internet, how can I do that ??? From GUI side and the prompt site???? Please help Thanks (1 Reply)
Discussion started by: lapnguyen
1 Replies

2. UNIX for Dummies Questions & Answers

May download a folder using wget command!

Hi All, I think wget command would not download any directories. But please confirm it. If it downloads directories, please let me know how to do it. Thank you. (1 Reply)
Discussion started by: ThrdF
1 Replies

3. Shell Programming and Scripting

Parse the .txt file for folder name and FTP to the corrsponding folder.

Oracle procedure create files on UNIX folder on a regular basis. I need to FTP files onto windows server and place the files, based on their name, in the corresponding folders. File name is as follows: ccyymmddfoldernamefile.txt; Folder Name length could be of any size; however, the prefix and... (3 Replies)
Discussion started by: MeganP
3 Replies

4. Shell Programming and Scripting

File Management: How do I move all JPGS in a folder structure to a single folder?

This is the file structure: DESKTOP/Root of Photo Folders/Folder1qweqwasdfsd/*jpg DESKTOP/Root of Photo Folders/Folder2asdasdasd/*jpg DESKTOP/Root of Photo Folders/Folder3asdadfhgasdf/*jpg DESKTOP/Root of Photo Folders/Folder4qwetwdfsdfg/*jpg DESKTOP/Root of Photo... (4 Replies)
Discussion started by: guptaxpn
4 Replies

5. Shell Programming and Scripting

load file to sharepoint using unix

I have a requirement to upload a file to the MS sharepoint site using unix or any other programming language. Does sharepoint support ftp? I heard it doesn't ...is it true...if yes is it different from what regular ftp we use....is there any other programming way out to upload the file to... (1 Reply)
Discussion started by: RubinPat
1 Replies

6. Shell Programming and Scripting

copy file to sharepoint

Could you please guide me on copying/deleting file from unix/solaris machine to sharepoint (windows) . (0 Replies)
Discussion started by: ajay.bisht
0 Replies

7. Shell Programming and Scripting

Wget, download file from site's folder.

Ok, this is quite weird. wget -r mysite.com/mylink/ should get all the files recursively from the 'mylink' folder. The problem is that wget saves an index.html file! When I open this index.html with my browser I realize that it shows all the files in the current folder (plus an option to move... (3 Replies)
Discussion started by: hakermania
3 Replies

8. Shell Programming and Scripting

want to move set of file from one folder to another folder

Hi all, let me explain my requirments i am having 5 folder with different name for eg) abc , cdf , efd, rtg, ead each 5 folders contain 15 files i want to move 10 files to some other folder, remain 5 files should be there in the same folder. give me some suggestion on this. (6 Replies)
Discussion started by: natraj005
6 Replies

9. Shell Programming and Scripting

Shell: uploading file from UNIX server to sharepoint server

Is it possible to upload a file from unix server to sharepoint server through shell or perl scripting. I have the sharepoint link where it needs to be uploaded. Could you please share your views on this ? (0 Replies)
Discussion started by: scriptscript
0 Replies

10. Shell Programming and Scripting

How to download recursively a folder using /usr/bin/ftp and cshell?

Hi, friends, I am meet a ftp download problem when using cshell and /usr/bin/ftp command. I want to download recursively a folder dira from FTP server. dira ---dira1-----dira2------dira3-----dira4 |--file11 |--file21 |--file31 |--file41 |--file12 |--file22 |--file32 ... (1 Reply)
Discussion started by: weichanghe2000
1 Replies
BLASTCLUST(1)						     NCBI Tools User's Manual						     BLASTCLUST(1)

NAME
blastclust - BLAST score-based single-linkage clustering SYNOPSIS
blastclust [-] [-C] [-L X] [-S X] [-W N] [-a N] [-b F] [-c filename] [-d filename] [-e F] [-i filename] [-l filename] [-o filename] [-p F] [-r filename] [-s filename] [-v [filename]] DESCRIPTION
blastclust automatically and systematically clusters protein or DNA sequences based on pairwise matches found using the BLAST algorithm in case of proteins or Mega BLAST algorithm for DNA. In the latter case a single Mega BLAST search is performed for all the sequences combined against a database created from the same sequences. blastclust finds pairs of sequences that have statistically significant matches and clusters them using single-linkage clustering. OPTIONS
A summary of options is included below. - Print usage message -C Complete unfinished clustering -L X Length coverage threshold (default = 0.9) -S X Score coverage threshold (bit score / length if < 3.0, percentage of identities otherwise; default = 1.75) -W N Use words of size N (length of best perfect match; zero invokes default behavior: 3 for proteins, 32 for nucleotides) -a N Number of CPU's to use (default = 1) -b F Do not require coverage on both neighbours -c filename Read advanced options from configuration file filename -d filename Input as a database -e F Disable id parsing in database formatting -i filename FASTA input file (program will format the database and remove files in the end; default = stdin) -l filename Restrict reclustering to id list in filename -o filename Output file for list of clusters (default = stdout) -p F Input is nucleotides, not proteins. -r filename Restore neighbors for reclustering from filename -s filename Save all neighbours to filename -v [filename] Print verbose progress messages (to filename) AUTHOR
The National Center for Biotechnology Information. SEE ALSO
blast(1), formatdb(1), /usr/share/doc/blast2/blastclust.html, <http://www.ncbi.nlm.nih.gov/BLAST/> NCBI
2004-06-25 BLASTCLUST(1)
All times are GMT -4. The time now is 04:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy