05-09-2013
So... like this:printf "cp /path/to/app.app/folder/$x.plist" >> /var/mobile/z_folder/"$x".sh
this:printf "cp /path/to/app.app/folder/"$x".plist" >> /var/mobile/z_folder/"$x".sh
or this?:
printf "cp /path/to/app.app/folder/""$x"".plist" >> /var/mobile/z_folder/"$x".sh
??
I think the first two didn't work for me... do they for you ?
Last edited by Scott; 05-09-2013 at 09:07 PM..
Reason: Removed formatting.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi expersts,
in my directory i have *.txt and *.TXT and *.TXT.log, *.txt.log
I want list only .txt and .TXT files in one command...
how to ??
//purple (1 Reply)
Discussion started by: thepurple
1 Replies
2. Shell Programming and Scripting
Hi,
I have written a script to retrieve phone numbers from an error log and output the phone numbers into an text file. I then use the list of phone numbers to process each value into a variable so I can run a sql query and update the database. My problem is I can only process the first value... (2 Replies)
Discussion started by: rdr411
2 Replies
3. Shell Programming and Scripting
I want to instert Category:XXXXX into the 2. line
something like this should work, but I have somewhere the wrong sytanx. something with the linebreak goes wrong:
sed "2i\\${n}Category:$cat\n"
Sample:
Titel Blahh Blahh abllk sdhsd sjdhf
Blahh Blah Blahh
Blahh
Should look like... (2 Replies)
Discussion started by: lowmaster
2 Replies
4. UNIX for Dummies Questions & Answers
Hello. I have the following issue: my txt file has the following format:
train/dr4/fklc0/sx175.txt
0 80282 Severe myopia contributed to Ron's inferiority complex.
train/dr4/fklc0/sx355.txt
0 42906 Dolphins are intelligent marine mammals. train/dr4/fklc0/sa2.txt
awk 'NR%2==0' test1.txt >... (4 Replies)
Discussion started by: li_bi
4 Replies
5. Shell Programming and Scripting
Hi all,
One of my txt file has common format like . And I need to manually assign variable to "/a/b/c/file1/txt" , which has common text before "Calculated summary file:".
I wonder if I can use some command to do that for me, that it read the file and check for that comonn text and assign... (2 Replies)
Discussion started by: emily
2 Replies
6. Shell Programming and Scripting
Hello
i tried many times echo $variables into text file with no success
for example:
echo "#!/bin/sh
BBHTAG=RFOCLT_check # What we put in bb-hosts to trigger this test
COLUMN=RFOCLT # Name of the column, often same as tag in bb-hosts
$BBHOME/bin/bbhostgrep $BBHTAG | while read... (5 Replies)
Discussion started by: mogabr
5 Replies
7. Shell Programming and Scripting
I want to add/append the info in the following format to my.txt file.
20130702|abcd20130702.txt FN|SN|DOB
I tried the below script but it throws me some exceptions.
<#!/bin/sh
dt = date '+%y%m%d'members;
echo $dt+|+members+$dt;
/usr/bin/awk -f
BEGIN { FS="|"; OFS="|"; } { print... (6 Replies)
Discussion started by: harik1982
6 Replies
8. Shell Programming and Scripting
Hey,
I've created following script:
var1=test1
setA=testA
if
...
touch $setA/$var1
...
fi
I would like now the repeat the command touch (in this example) for different variables.
So below, the varX should run 3 times (var1, var2, var4). Var3 is skipped in this example... (4 Replies)
Discussion started by: brononius
4 Replies
9. UNIX for Dummies Questions & Answers
Hi All
Is there a way to export every line into new txt file where by the title of each txt output are same as the line ?
I have this txt files containing names:
Kandra Vanhooser
Rhona Menefee
Reynaldo Hutt
Houston Rafferty
Charmaine Lord
Albertine Poucher
Juana Maes
Mitch Lobel... (2 Replies)
Discussion started by: Nexeu
2 Replies
10. Shell Programming and Scripting
hi,
i'm trying to write a tcsh script that reads in a text file (one column) and the runs a different command for each line of text.
i've found lots of example commands for bash, but not for tcsh.
can anyone give me a hint?
thanks,
jill (8 Replies)
Discussion started by: giuinha
8 Replies
LEARN ABOUT DEBIAN
plack::middleware::conditional
Plack::Middleware::Conditional(3pm) User Contributed Perl Documentation Plack::Middleware::Conditional(3pm)
NAME
Plack::Middleware::Conditional - Conditional wrapper for Plack middleware
SYNOPSIS
use Plack::Builder;
builder {
enable_if { $_[0]->{REMOTE_ADDR} eq '127.0.0.1' } 'StackTrace', force => 1;
$app;
};
# or using the OO interface:
$app = Plack::Middleware::Conditional->wrap(
$app,
condition => sub { $_[0]->{REMOTE_ADDR} eq '127.0.0.1' },
builder => sub { Plack::Middleware::StackTrace->wrap($_[0], force => 1) },
);
DESCRIPTION
Plack::Middleware::Conditional is a piece of meta-middleware, to run a specific middleware component under runtime conditions. The goal of
this middleware is to avoid baking runtime configuration options in individual middleware components, and rather share them as another
middleware component.
EXAMPLES
Note that some of the middleware component names are just made up for the explanation and might not exist.
# Minify JavaScript if the browser is Firefox
enable_if { $_[0]->{HTTP_USER_AGENT} =~ /Firefox/ } 'JavaScriptMinifier';
# Enable Stacktrace when being accessed from the local network
enable_if { $_[0]->{REMOTE_ADDR} =~ /^10.0.1.*/ } 'StackTrace';
# Work with other conditional setter middleware:
# Transcode Jpeg on the fly for mobile clients
builder {
enable 'MobileDetector';
enable_if { $_[0]->{'plack.mobile_detected'} }
'TranscodeJpeg', max_size => 30_000;
$app;
};
Note that in the last example MobileDetector should come first because the conditional check runs in pre-run conditions, which is from
outer to inner: that is, from the top to the bottom in the Builder DSL code.
AUTHOR
Tatsuhiko Miyagawa
Steve Cook
SEE ALSO
Plack::Builder
perl v5.14.2 2012-04-14 Plack::Middleware::Conditional(3pm)