Computing desk | ||
---|---|---|
< June 28 | << May | June | Jul >> | June 30 > |
Welcome to the Wikipedia Computing Reference Desk Archives |
---|
The page you are currently viewing is an archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages. |
Hi All,
I need help on a bash script. Here's what I need to do: I have this folder, which gets filled with .wav files (recordings) daily, and I want to segregate /move them into subdirectories based off a couple of factors.
This is basically what I want to do
pattern1 = ^OUT[0-9]{4}
pattern2 = ^g[0-9]{4}
default= any pattern not matched above, will be moved to a MISC folder (step 4)
That is it basically... I hope someone can help me out. TIA PrinzPH (talk) 01:26, 29 June 2010 (UTC)
PS- I intend to put this in the crontab if it matter... PrinzPH (talk) 01:28, 29 June 2010 (UTC)
#!/bin/bash
SOURCEDIR=/var/test
TARGETDIR=/var/test
PATTERN1='^OUT[0-9]{4}'
PATTERN2='^g[0-9]{4}'
TODAYDIR="$TARGETDIR/$(date +%Y%m%d)"
cd "$SOURCEDIR"
for i in *; do
if [ -f "$i" ]; then
if [[ "$i" =~ $PATTERN1 ]] || [[ "$i" =~ $PATTERN2 ]]; then
THISDIR="$TODAYDIR/${BASH_REMATCH[0]}"
else
THISDIR="$TODAYDIR/misc"
fi
mkdir -p "$THISDIR"
mv "$i" "$THISDIR/$i"
fi
done
Hi, I want to make a program in Ruby that will allow a friends computer to connect with mine, and then allow us to play tic tac toe. Unfortunately, I have no idea how to go about connecting the two computers, or how to manage input/output between them once they are connected, can anyone give me a few tips regarding this or point me to helpful, but simple, information on how to accomplish this? Thank you:) 66.202.66.78 (talk) 04:26, 29 June 2010 (UTC)
OP here, I wrote the above when very sleepy; essentially, I know how to use ruby, I'm just not very aquainted with networking stuff. Ultimately, I want to be able to write a program that when open on two computers, will designate a given computer as in "control", when that computer gives input to it's instance of the program it will put it into a given state, then transmit data over to the other program putting it in the same state and putting it in "control". I really only need to do this using a small number of computers, hence, I'm hoping that a fairly simple means can be used to accomplish it. Any help would be greatly appreciated:) 66.202.66.78 (talk) 09:41, 29 June 2010 (UTC)
My pop gmail account, which worked OK a few minutes ago is giving problem. The Outlook Express client is asking for the password (this happens when password fed is not correct, but password is there alright ) Even if I fill up the correct password it does'nt help. The other gmail account is OK (as of now), what the hell is wrong ? Jon Ascton (talk) 07:15, 29 June 2010 (UTC)
A few days ago I asked if a greasemonkey userscript could scan a given webpage, pick a link on the page at random, and then navigate to that link. People said I would be too complicated, so I have a new question: Could a greasemonkey userscript randomly pick a url from a list of urls I specify, then navigate to it? For example:
http://example.com/123 http://example.com/456 http://example.com/789 http://example.com/abc http://example.com/def http://example.com/ghi
82.43.90.93 (talk) 10:32, 29 June 2010 (UTC)
var urls = ["http://example.com/123", "http://example.com/456", "http://example.com/789", "http://example.com/abc", "http://example.com/def", "http://example.com/ghi"]; window.location.replace(urls[Math.floor(Math.random()*urls.length)]);
Thanks! 82.43.90.93 (talk) 20:03, 29 June 2010 (UTC)
Hello all,
I'm trying to figure out the usage of an SDK provided by a thermal camera company and unfortunately I'm entirely unclear on how to proceed. As of yet, internet searches have yielded no results, and the documentation for the SDK itself is rather sparse (at least, in my opinion; I have a decent amount of experience with the use of C++ for scientific computing purposes but no experience with ActiveX, so perhaps if I did the documentation would make more sense to me). At any rate, the SDK apparently takes the form of an "ActiveX Control Module". The SDK documentation lists three files: a license file (.lic), a binary load file (.ocx), and a type library (.tlb). I believe these form the SDK runtime needed to run applications made using the SDK, but I'm not sure. It also says that the ActiveX Control Module includes one interface (which it provides the name of) and gives the object name that is exposed to applications. The rest of the documentation focuses on object properties and methods.
So, my question is: given the information detailed above, how do I use this SDK in C++? Should I #include or #import certain files? Can I use this SDK in C++ IDEs that aren't from the Microsoft Visual Studio/C++ family (some sources I've seen seem to indicate that ActiveX controls can be integrated into C++ code in Visual Studio/C++ only)?
Any suggestions would be appreciated, as I've pretty much hit a wall. Thanks for taking the time to read this.
Hiram J. Hackenbacker (talk) 15:08, 29 June 2010 (UTC)
I've been given the task to work on a external customer front-end to our company's internal JIRA system. The front-end uses SOAP to connect to JIRA. I've already run into one problem: if the front-end user logs in as a JIRA user who only has external user privileges to a project, he/she can only see his/her own comments to the project's issues, while the specification states that he/she should be able to see all comments to the issues. But it looks like the JIRA SOAP method getComments(String issueKey, String user)
is actually implemented to only return the user's own comments if the user only has external user privileges. Is there a way around this? JIP | Talk 18:49, 29 June 2010 (UTC)
I am in a hot room. A computer sensor - on the chip I think - says its temperature is 39 degrees centigrade. The HD temperature is 34 degrees centrigrade. Are these acceptable temperatures, or are they too hot? I have an old computer. Thanks 92.29.119.46 (talk) 18:55, 29 June 2010 (UTC)
I have a Intel celeron M 380 1.6GHz laptop and have just had the internet for the first time. I have gone wireless and have to plug a 802.11g usb into my laptop. I keep losing the connection to the internet and wandered if it was because of a 'dodgy' usb. I have the laptop about 3 years. Should I buy a new 802.11g usb or another better one? <span style="font-size: smaller;" class="autosigned">—Preceding unsigned comment added by 78.150.70.39 (talk) 19:46, 29 June 2010 (UTC)
Is an IDE drive (on a dell dimension) in XP that keeps reverting to PIO mode after a few weeks (reset to UDMA5 by uninstalling driver and rebooting) more likely to be a faulty HDD or faulty IDE controller? Would swapping the HDD and DVDR IDE cables on the mobo tell me if it was the IDE controller, or are both channels potentially controlled by the same faulty chipset? —Preceding unsigned comment added by 128.151.32.169 (talk) 21:13, 29 June 2010 (UTC)
I'm looking for some freely available software that can display a multi-column list, and sort the whole list (keeping rows coherent) by just clicking on the top of a column. Rather than doing a lot of clicking to say its a global sort or having to highlight everything and so on.
The freeware 'List Squared' can do this, but is there any other software that can do the same, such as a spreadsheet or simple database, while offering more functions? I've alrerady done a lot of searching. Thanks 92.24.183.236 (talk) 23:16, 29 June 2010 (UTC)
The important thing is only requiring one click on the top of the column to sort everything (while keeping rows coherent) which I do not think Calc can do. 92.29.114.87 (talk) 09:38, 30 June 2010 (UTC)
What would be the best language for a beginner to write a program or script that merges two file trees including combining folders with the same name, but automatically renames same-filename files to prevent overwriting? I've never found any software that can do this. Thanks 92.24.183.236 (talk) 23:24, 29 June 2010 (UTC)
cp could be perfect, but I presume it does not run under Windows? Is there a Windows version anywhere? Thanks 92.29.114.87 (talk) 09:41, 30 June 2010 (UTC)