• Laravel GLOB public path 2019-01-09

    In Laravel I want to get all images from a dir, I just have a problem getting the path to the public folder. $images = []; foreach(File::glob('/public/img/uploads/*.*') as $filename) { $images[] = $filename; } If I use this function it returns nothin

    Tags: path, glob, laravel
  • What does `(.N)` do in this extended glob? 2018-03-27

    The Prezto documentation has the following example script for setting up symlinks: setopt EXTENDED_GLOB for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^; do ln -s "$rcfile" "${ZDOTDIR:-$HOME}/.${rcfile:t}" do

    Tags: zsh, glob, prezto
  • How to use fnmatch from a shell? 2014-12-29

    In a generic shell script, I would like to use shell pattern matching to filter the lines of a text file. I have a list of file names in files.txt: file1.txt file3.png And I have a list of patterns in patterns.txt: other_file.txt file2.* If

    Tags: shell, glob
  • argv: Sanitizing wildcards 2014-11-24

    I was working on an example in the K&R C book where it asks you to essentially build an RPN calculator that takes input through command line arguments. My solution essentially iterates through the given arguments and spits out the answer, but I n

    Tags: shell, linux, gcc, glob
  • Automatically find files that start with similar strings (and find these strings) using Python 2014-11-06

    I have a directory with a number of files in a format similar to this: "ABC_01.dat", "ABC_02.dat", "ABC_03-08.dat", "DEF_13.dat", "DEF_14.dat", "DEF_16.dat", "GHI_09.dat", "GHI_12-14.dat" etc., you get the idea. Essentially, what I want to do is merg

    Tags: python, glob
  • Wildcard expansion (globbing) in a string composed of quoted and unquoted parts 2014-06-17

    I have a line in a shell script that looks like this: java -jar "$dir/"*.jar , since I just want to execute whatever the jar file happens to be named in that folder. But this is not working as I expected. I get the error message: Error: Unable to acc

    Tags: shell, bash, quoting, glob
  • Using 'glob' to display files with no extension? 2014-03-19

    I am using the following code to display the files in descending order of date. But When I upload any file without extension its not visible because of glob, is there any way to show the hidden files? Code: <?php $dir = "/opt/lampp/htdocs/jquery";

    Tags: php, glob
  • find certain files using glob pattern 2014-01-15

    I'm using logstash to constantly look for a new files and stream the data to a different systems. Right now I'm using this config: input { file { type => "source" path => "/ebs/**/*-*csv" # recursivly check subfolders sincedb_path => "/usr/l

    Tags: ruby, regex, path, glob, logstash
  • Python script jump the line with os and glob modules when is runned in PHP 2013-10-25

    I have problem with a for cycle and glob and os modules. In python Shell the print is printed but when i embed my python script in php it does not work. The python below via PHP print only "first" and "second" but do not print "current file is:...".

    Tags: php, python, glob
  • Bash to match pattern in filename then add/edit 2013-10-24

    I'm sure this has been answered before, but I can't seem to use the right search terms to find it. I'm trying to write a bash script that can recognize, sort, and rename files based on patterns in their names. Take this filename, for example: BBC Som

    Tags: bash, filenames, glob, pattern matching
  • PHP - glob() sort not working on Host's server 2013-07-09

    Although this code SORTS the filename and then SORTS the extension perfectly locally, I cannot get this to work on any Hosting company's (shared) server - regardless of the PHP version. It simply will not do any sorting on my Host's server. I have tr

    Tags: php, sorting, directory, glob
  • Copy file into all subfolders 2013-06-27

    I have one php.ini file that is supposed to activate PHP compression (global settings can't be set on my server). Unfortunately, the settings made in that file only apply to files in that exact same folder. In order to apply those settings to all my

    Tags: php, ant, glob
  • Globbing patterns for sub-projects in Grunt 2013-02-22

    I have several sub-projects that I want to run against a single Gruntfile, as they all need the same tasks running against them. For example, I need to compile the Sass using Compass in each sub-project. How is this possible using Grunt? I have tried

    Tags: build, glob, gruntjs
  • Using glob on a directory above current? 2012-05-02

    Currently I have a script running to grab all the images in a directory based on ending with "154x154.jpg". Basically what I'm doing is going through a gallery directory and looking for all the thumbnails of images, which I will then output in a slid

    Tags: php, glob
  • Ruby Dir.glob on windows network share 2012-05-02

    I would like to get a simple list of files with Dir.glob on a windows machine, where the filter would be something like //hostname/share/folder/*.zip. The only thing that works with glob on windows is a local path: c:/folder/*.zip I tried different w

    Tags: ruby, windows, glob, dir
  • Git Glob syntax: ignoring files everywhere or in a specific folder 2012-04-13

    I would like to exclude .DS_Store tracking from myfolder and all subfolders. I also want to exclude a .project file from myfolder (but not from its subfolders). What should I write in .gitignore (situated in myfolder)? .DS_Store # or *.DS_Store ? I m

    Tags: git, gitignore, glob
  • What is the best method to read a folder sub directory and files in those sub directory? 2012-04-06

    I have a image folder which contains sub directory for each album of images like Images Images/Album1 Images/Album2 in PHP file I create a link for each album using a thumbnail for the album using GLOB to read all folders under Images $dir=glob('imag

    Tags: php, glob
  • Nested glob directory listings not returning properly 2012-04-02

    I am trying to fix a decent number of Id3 Album/Artist tags in (3500+) music files spread through a directory tree structure like so: "Winamp Library/Artist Name/Album Name/Song.(mp3/flac/whatever)" This code only prints a list of Artist Names in the

    Tags: python, id3, windows 7, glob
  • how to interpolate recursive search in zsh 2012-03-24

    I want to use an environment variable in a command with recursive search. export RAILS_FILE_EXTENSIONS='(erb|feature|haml|jrxml|js|rake|rb|rxml|scss|xml|yml)' ls **/*.${RAILS_FILE_EXTENSIONS} It does not work this way. How should it look like? ------

    Tags: zsh, glob, variable subsitution
  • Geting last file uploaded out of a number of dir 2012-03-24

    I am going to have one directory with multiple sub-directories. I want to be able to get the last, one, uploaded/modified flv out of each directory and be able create a formatted list that can be outputted. I have used glob and foreach to create list

    Tags: php, glob, scandir

Copyright (C), All Rights Reserved.

processed in 5.312 (s). 9 q(s)