find

Bash script to find specific files in a hierarchy of files

孤街醉人 提交于 2019-12-11 18:12:49
问题 I have a folder in which there are many many folder and in each of these I have lots and lots of files. I have no idea which folder each files might be located in. I will periodically receive a list of files I need to copy to a predefined destination. The script will run on a Unix machine. So, my little script should: read received list find all files in the list copy each file to a predefined destination via SCP step 1 and 3, I think I'll manage on my own, but how will I do step 2? I was

Windows command/commands to FIND file and COPY it to certain location or directory where batch file was launched from

大兔子大兔子 提交于 2019-12-11 17:56:24
问题 So, I have started with this: copy | dir /s /b | find "myFile" C:\Destination but the problem is that the destination is not visible in this command. It only sees the first part of the command up until C:\Destination. Is there a way I can search for a file and copy it? I have also tried this: SET source = dir /s /b | find "myFile" SET destination = %CD% copy %file% %destination% but it doesn't work. At some point even trying to set a variable that points to the current directory ( %CD% )

Why would xargs split input on spaces and how to resolve it?

血红的双手。 提交于 2019-12-11 17:18:40
问题 In the following bash script, I'm capturing file a file list from a path into a variable and then passing it on into xargs for further operations. I've found that simply echo ing the variable gives each line with spaces appropriately with a newline terminator for each line. However when I printf or echo this over to xargs , I'm finding that xargs appears to be splitting the input of each line by spaces as well. I'll illustrate with the following example with comments including the result I'm

MongoDB finding specific elements and sorting

北城以北 提交于 2019-12-11 16:49:58
问题 This is my data in the collection: { "installation" : 200278 , "date" : [ { "date" : "2014-12-28" , "values" : [ { "time" : "2014-12-28 00:15:26" , "value" : 26}, { "time" : "2014-12-28 00:30:26" , "value" : 15} , { "time" : "2014-12-28 00:45:26" , "value" : 7} , { "time" : "2014-12-28 01:00:26" , "value" : 32} ] }, { "date" : "2014-12-29" , "values" : [ { "time" : "2014-12-29 00:15:26" , "value" : 26}, { "time" : "2014-12-29 00:30:26" , "value" : 15} , { "time" : "2014-12-29 00:45:26" ,

How to avoid subshell behaviour using while and find? [duplicate]

你离开我真会死。 提交于 2019-12-11 16:30:58
问题 This question already has answers here : While-loop subshell dilemma in Bash (4 answers) Closed 9 months ago . Because I trapped into this myself, I asked a question and did give also the answer here. If find iterates over what the command did find, this is executed from bash in a subshell. So you can not fill an array with results and use it after your loop. 回答1: You have to change the syntax from: i=0 find $cont_dirs_abs -type l -exec test -e {} \; -print0 | while IFS= read -r -d '' lxc

How to use FIND_IN_SET in MySQL?

爷,独闯天下 提交于 2019-12-11 16:16:15
问题 How to use FIND_IN_SET, The values I have is | Val | | No, 1, Yes,5, O, 4| I tried doing FIND_IN_SET('No', Val) And got the value of 1 and then I tried: FIND_IN_SET('No', Val) as 'No', FIND_IN_SET('Yes', Val) as ''Yes' But got the output | No | Yes | | 1 | 0 | How come it suddenly can't find the 'Yes' in the text? Another format: | Val | | No, 1, Yes,5, O, 4 | Note: This is not on 3 rows, just on one row but using the next line(line breaks) for the other values 回答1: Because the actual value

Get paragraph no where txt is found, and move text to end of paragraph using Word 2010 vba

北城余情 提交于 2019-12-11 13:59:25
问题 I am trying to use VBA to move a rich text clause ("strText"), which appears at the beginning of various paragraphs, to the end of each paragraph where the clause appears, and thereafter to underline strText. I am a novice/hobbyist at vba programming, so please be gentle. I spent a few days on this before seeking help. Problems with my attempted coding (which appears below): I tried to assign to var "LparaNo" the number of the paragraph wherein the found text (strText) appears. But the number

VBA Find not working

陌路散爱 提交于 2019-12-11 13:45:35
问题 I have a workbook containing a list of all invoices from all branches, let's call it "Everything", and basically I need to search if the invoices are found in another file containing each branch's invoices,. It's actually on file for each branch, and each file is divided with sheets by month, and I need to check in every sheet and then insert a value in a cell. Let's call this one "0001" and so on for each branch. The "everything" file contains basically one column with the branch number, one

Xcode 4 — how to find the built project's binary

♀尐吖头ヾ 提交于 2019-12-11 13:36:40
问题 I need a tool for my development work. This tool only exists in code form. So I have to build it. I'm following the instructions in http://projects.akosma.com/projects/nib2objc/wiki/Build_Instructions. Everything looks good. I press CMD + R (Xcode 4). Everything successfully builds, but nothing runs. Unsurprising, it is a commandline tool. But how do I find the binary that just got generated? Also, what happened to debug / release build? I bet I am running a debug build, but I can't find how

telerik RadComboBox find Returns null - why?

主宰稳场 提交于 2019-12-11 12:41:49
问题 why the below javascript code always returns null (mean alert) ? <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="WebApplication3.WebForm1" %> <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head id="Head1" runat="server"> <title></title> </head> <body