code stringlengths 1 1.96M | language stringclasses 1
value |
|---|---|
#!/bin/sh
# PRE-LOCK HOOK
#
# The pre-lock hook is invoked before an exclusive lock is
# created. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-lock' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (the pat... | Shell |
#!/bin/sh
# PRE-UNLOCK HOOK
#
# The pre-unlock hook is invoked before an exclusive lock is
# destroyed. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-unlock' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH ... | Shell |
#!/bin/sh
# POST-COMMIT HOOK
#
# The post-commit hook is invoked after a commit. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-commit' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this rep... | Shell |
#!/bin/sh
# PRE-COMMIT HOOK
#
# The pre-commit hook is invoked before a Subversion txn is
# committed. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-commit' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (t... | Shell |
#!/bin/sh
# PRE-REVPROP-CHANGE HOOK
#
# The pre-revprop-change hook is invoked before a revision property
# is added, modified or deleted. Subversion runs this hook by invoking
# a program (script, executable, binary, etc.) named 'pre-revprop-change'
# (for which this file is a template), with the following or... | Shell |
#!/bin/sh
# POST-UNLOCK HOOK
#
# The post-unlock hook runs after a path is unlocked. Subversion runs
# this hook by invoking a program (script, executable, binary, etc.)
# named 'post-unlock' (for which this file is a template) with the
# following ordered arguments:
#
# [1] REPOS-PATH (the path to this... | Shell |
#!/bin/sh
if [[ -z $ADB ]]; then ADB=adb; fi
./kill_process.sh
$ADB shell rm -r /data/data/com.google.android.apps.iosched/* | Shell |
#!/bin/sh
if [[ -z $ADB ]]; then ADB=adb; fi
$ADB shell am force-stop com.google.android.apps.iosched
| Shell |
#!/bin/sh
if [[ -z $ADB ]]; then ADB=adb; fi
$ADB shell "echo '$*' | sqlite3 -header -column /data/data/com.google.android.apps.iosched/databases/schedule.db" | Shell |
#!/bin/sh
# Sessions list
#adb shell am start -a android.intent.action.VIEW -d content://com.google.android.apps.iosched/tracks/android/sessions
# Vendors list
#adb shell am start -a android.intent.action.VIEW -d content://com.google.android.apps.iosched/tracks/android/vendors
# Session detail
#adb shell am start -a... | Shell |
#!/bin/sh
if [[ -z $ADB ]]; then ADB=adb; fi
MAC_UNAME="Darwin"
if [[ "`uname`" == ${MAC_UNAME} ]]; then
DATE_FORMAT="%Y-%m-%dT%H:%M:%S"
else
DATE_FORMAT="%Y-%m-%d %H:%M:%S"
fi
if [ -z "$1" ]; then
NOW_DATE=$(date "+${DATE_FORMAT}")
echo Please provide a mock time in the format \"${NOW_DATE}\" or \"d\" to del... | Shell |
#!/bin/sh
adb shell cat /data/data/com.google.android.apps.iosched/shared_prefs/com.google.android.apps.iosched_preferences.xml | xmllint --format - | Shell |
#!/bin/sh
# Remember VERBOSE only works on debug builds of the app
adb shell setprop log.tag.iosched_SyncHelper VERBOSE
adb shell setprop log.tag.iosched_SessionsHandler VERBOSE
adb shell setprop log.tag.iosched_ImageCache VERBOSE
adb shell setprop log.tag.iosched_ImageWorker VERBOSE
adb shell setprop log.tag.iosched_I... | Shell |
#!/bin/sh
adb shell pm clear com.google.android.apps.iosched | Shell |
#!/bin/sh
if [[ -z $ADB ]]; then ADB=adb; fi
$ADB shell am start \
-a android.intent.action.MAIN \
-c android.intent.category.LAUNCHER \
-n com.google.android.apps.iosched/.ui.HomeActivity
| Shell |
#!/bin/bash
#
# Copyright (c) 2010 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | Shell |
# Copyright 2013 Google Inc. All Rights Reserved.
#
#
# This script sets up all build/test dependencies including Google App Engine,
# WebTest, Selenium, Chromedriver, etc. All other scripts will include this
# script to setup these dependencies.
#
# Force shell to fail on any errors.
set -e
shopt -s nullglob
# Se... | Shell |
#!/bin/bash
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Wrapper script for modules.py that sets up paths correctly. Usage from your
# coursebuilder/ folder:
#
# sh scripts/modules.sh [args]
set -e
. "$(dirname "$0")/common.sh"
python "$COURSEBUILDER_HOME/scripts/modules.py" "$@"
| Shell |
#!/bin/bash
# Copyright 2012 Google Inc. All Rights Reserved.
#
# author: sll@google.com (Sean Lip)
# Run this script from the Course Builder folder as follows:
# sh ./scripts/test.sh --test_class <dotted test name>
# E.g.,
# Run all tests in a module:
# sh ./scripts/test.sh tests.unit.common_safe_dom
#
# ... | Shell |
#! /bin/sh
# Copyright 2012 Google Inc. All Rights Reserved.
#
# author: psimakov@google.com (Pavel Simakov)
#
# This script starts local developer Google AppEngine server for integration
# tests and initializes it with a default data set.
#
# Run this script from the coursebuilder/ folder:
# sh ./scripts/start_i... | Shell |
#!/bin/bash
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Usage:
#
# Run this script from the Course Builder folder. It can be run with the
# following arguments:
#
# Deploy Course Builder to the App Engine app named in app.yaml:
# sh ./scripts/deploy.sh
#
# Deploy Course Builder to the given App Engine ap... | Shell |
# Copyright 2012 Google Inc. All Rights Reserved.
#
# author: psimakov@google.com (Pavel Simakov)
#
# This script starts local developer Google AppEngine server and initializes it
# with the default data set.
#
# Run this script from the coursebuilder/ folder:
# sh ./scripts/start.sh
#
usage () { echo "Options: -... | Shell |
#! /bin/bash
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Wrapper script to launch PyLint ( http://www.pylint.org/ ) against
# CourseBuilder sources. This script is automatically run as part of
# run_all_tests.py, and can be used on individual files; run with -h
# option to get the "help" text on options and... | Shell |
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Set common config variables for developer runtime environment scripts.
# NOTE: This file is also evaluated by Python scripts to get configurations
# from environment variables. Do not add any non-idempotent side-effects
# to this script.
export SOURCE_DIR="$( cd "... | Shell |
#!/bin/bash
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Wrapper script for tools/etl/etl.py that sets up the environment correctly.
#
# Run this script as follows:
# sh ./scripts/etl.sh <arguments>
#
# ETL's arguments are involved; pass --help for details. You will need to
# provide credentials when usin... | Shell |
#! /bin/sh
#
# This script is used to configure the Linux kernel.
#
# It was inspired by the challenge in the original Configure script
# to ``do something better'', combined with the actual need to ``do
# something better'' because the old configure script wasn't flexible
# enough.
#
# Raymond Chen was the original au... | Shell |
#! /bin/sh
#
# This script is used to configure the linux kernel.
#
# It was inspired by a desire to not have to hit <enter> 9 million times
# or startup the X server just to change a single kernel parameter.
#
# This script attempts to parse the configuration files, which are
# scattered throughout the kernel source... | Shell |
#!/bin/sh
FILES=`find $1 -name '*.[sShc]' -exec file {} \;|grep "ISO-8859"|awk -F ":" '{print $1}'`
echo $FILES
for i in $FILES;do
iconv -f GBK -t UTF-8 $i>tmp
mv tmp $i
done
| Shell |
#! /bin/sh
#
# This script is used to configure the Linux kernel.
#
# It was inspired by the challenge in the original Configure script
# to ``do something better'', combined with the actual need to ``do
# something better'' because the old configure script wasn't flexible
# enough.
#
# Raymond Chen was the original au... | Shell |
#! /bin/sh
#
# This script is used to configure the linux kernel.
#
# It was inspired by a desire to not have to hit <enter> 9 million times
# or startup the X server just to change a single kernel parameter.
#
# This script attempts to parse the configuration files, which are
# scattered throughout the kernel source... | Shell |
#!/bin/sh
FILES=`find $1 -name '*.[sShc]' -exec file {} \;|grep "ISO-8859"|awk -F ":" '{print $1}'`
echo $FILES
for i in $FILES;do
iconv -f GBK -t UTF-8 $i>tmp
mv tmp $i
done
| Shell |
#!/bin/sh
curdir=`pwd`
echo "back current dir to name-b"
FILES=`find $curdir -name *.[hc]`
echo $FILES
for i in $FILES;do
sed 's/acoral_u32 time/acoral_time time/g' $i>$curdir/tmp
mv $curdir/tmp $i
done
| Shell |
#!/bin/sh
curdir=`pwd`
echo $1
cp $1 $curdir/acoral_gbk -rf
cd $curdir/acoral_gbk
rm tools -rf
rm test -rf
rm tags -rf
rm rule.mk -rf
find ./ -name '.svn' -exec rm -rf {} \;
find ./ -name 'Makefile' -exec rm -rf {} \;
find ./ -name 'cfg.in' -exec rm -rf {} \;
find ./ -name 'cfg.mk' -exec rm -rf {} \;
find ./ -name '.co... | Shell |
#!/bin/sh
curdir=`pwd`
echo "back current dir to name-b"
FILES=`find $curdir -name *.[hc]`
echo $FILES
for i in $FILES;do
sed 's/acoral_u32 time/acoral_time time/g' $i>$curdir/tmp
mv $curdir/tmp $i
done
| Shell |
#!/bin/sh
curdir=`pwd`
echo $1
cp $1 $curdir/acoral_gbk -rf
cd $curdir/acoral_gbk
rm tools -rf
rm test -rf
rm tags -rf
rm rule.mk -rf
find ./ -name '.svn' -exec rm -rf {} \;
find ./ -name 'Makefile' -exec rm -rf {} \;
find ./ -name 'cfg.in' -exec rm -rf {} \;
find ./ -name 'cfg.mk' -exec rm -rf {} \;
find ./ -name '.co... | Shell |
#!/bin/sh
pat_report $1 > prof.flat
pat_report -b calltree $1 > prof.calltree
pat_report -b fu,callers $1 > prof.funccall
pat_report -b fu,ca -s show_callers=fu,source,line $1 > prof.funccallall
pat_report -d ti%,ti,max_ti,min_ti $1 > prof.bal
pat_report -b fu,pe $1 > prof.balfunc
pat_report -d ti%,ti,tr -b fu,pe='[mmm... | Shell |
#!/bin/bash
if [ "$1" == "" ] ; then
echo "usage: del_crontab.sh <crontab_item_regex>"
exit
fi
TMPFILE=`mktemp`
crontab -l > $TMPFILE
sed -i "/$1/d" $TMPFILE
crontab < $TMPFILE
rm $TMPFILE
| Shell |
#!/bin/bash
if [ "$1" == "" ] ; then
echo "usage: del_crontab.sh <crontab_item_regex>"
exit
fi
TMPFILE=`mktemp`
crontab -l > $TMPFILE
sed -i "/$1/d" $TMPFILE
crontab < $TMPFILE
rm $TMPFILE
| Shell |
#!/bin/bash
if [ "$1" == "" ] ; then
echo "usage: add_crontab.sh <crontab_item>"
exit
fi
TMPFILE=`mktemp`
crontab -l > $TMPFILE 2> /dev/null
echo "$1" >> $TMPFILE
crontab < $TMPFILE
rm $TMPFILE
| Shell |
#!/bin/bash
if [ "$1" == "" ] ; then
echo "usage: add_crontab.sh <crontab_item>"
exit
fi
TMPFILE=`mktemp`
crontab -l > $TMPFILE 2> /dev/null
echo "$1" >> $TMPFILE
crontab < $TMPFILE
rm $TMPFILE
| Shell |
#!/bin/bash
# set up the .htaccess file to point to the right path
echo AuthType Basic > .htaccess
echo AuthName \"Contest Judge\" >> .htaccess
echo AuthUserFile `pwd`/.htpasswd >> .htaccess
echo require valid-user >> .htaccess
# invoke htpasswd to set the judge password
echo Please set a password for the \"judge\" p... | Shell |
#!/bin/bash
# get user confirmation first
echo "------------------------------------------------------------"
echo "WARNING: This script will remove ALL TRACES of your contest!"
echo "------------------------------------------------------------"
echo "Proceed? (y/n) "
read confirm
if [ $confirm ] && [ $confirm = "y" ... | Shell |
#!/bin/bash
# get user confirmation first
echo "------------------------------------------------------------"
echo "WARNING: This script will remove ALL TRACES of your contest!"
echo "------------------------------------------------------------"
echo "Proceed? (y/n) "
read confirm
if [ $confirm ] && [ $confirm = "y" ... | Shell |
#!/bin/bash
# set up the .htaccess file to point to the right path
echo AuthType Basic > .htaccess
echo AuthName \"Contest Judge\" >> .htaccess
echo AuthUserFile `pwd`/.htpasswd >> .htaccess
echo require valid-user >> .htaccess
# invoke htpasswd to set the judge password
echo Please set a password for the \"judge\" p... | Shell |
#!/bin/sh
curdir=`pwd`
echo "back current dir to name-b"
FILES=`find $curdir -name *.[hc]`
echo $FILES
for i in $FILES;do
sed 's/acoral_u32 time/acoral_time time/g' $i>$curdir/tmp
mv $curdir/tmp $i
done
| Shell |
#! /bin/sh
#
# This script is used to configure the Linux kernel.
#
# It was inspired by the challenge in the original Configure script
# to ``do something better'', combined with the actual need to ``do
# something better'' because the old configure script wasn't flexible
# enough.
#
# Raymond Chen was the original au... | Shell |
#! /bin/sh
#
# This script is used to configure the linux kernel.
#
# It was inspired by a desire to not have to hit <enter> 9 million times
# or startup the X server just to change a single kernel parameter.
#
# This script attempts to parse the configuration files, which are
# scattered throughout the kernel source... | Shell |
#!/usr/bin/bash
PRGNAME=acolor
VERSION=${VERSION:-1.1.3}
BUILD=${BUILD:-1}
TAG=${TAG:-Sqy}
set -e
# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
arm*) ARCH=arm ;;
# Unless $ARCH is already set, use uname -m for all other ... | Shell |
#!/bin/bash
#Step1
echo "Step1 maping_the_unmapped_reads_to_genome Started"
/home/username/bin/bwa037a//bwa mem -t 30 -k 16 -T 20 /data/iGenome/mouse/Ensembl/NCBIM37/Sequence/BWAIndex/genome.fa UNMAP > unmap.sam
perl /home/username/ACF//ACF_Step1.pl unmap.sam unmap.parsed 30 0.9
perl /home/username/ACF//get_selected_... | Shell |
#!/usr/bin/env bash
################################################################################
#
# Bake is a shell script for running CakePHP bake script
#
# CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
#
# Licensed unde... | Shell |
#!/usr/bin/env bash
################################################################################
#
# Bake is a shell script for running CakePHP bake script
#
# CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
#
# Licensed unde... | Shell |
#!/usr/bin/env bash
################################################################################
#
# Bake is a shell script for running CakePHP bake script
#
# CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
#
# Licensed unde... | Shell |
#!/usr/bin/env bash
################################################################################
#
# Bake is a shell script for running CakePHP bake script
#
# CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
#
# Licensed unde... | Shell |
#!/usr/bin/env bash
################################################################################
#
# Bake is a shell script for running CakePHP bake script
#
# CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
#
# Licensed unde... | Shell |
#!/usr/bin/env bash
################################################################################
#
# Bake is a shell script for running CakePHP bake script
#
# CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org)
#
# Licensed unde... | Shell |
ant clean; ant release; adb install -r bin/MetaTracker-release.apk
| Shell |
#!/bin/bash
# ACL2 Parser for Java
# Copyright (C) 2013 Battelle Memorial Institute
#
# Contact:
# David Rager, ragerdl@cs.utexas.edu
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either v... | Shell |
#!/bin/bash
# ACL2 Parser for Java
# Copyright (C) 2013 Battelle Memorial Institute
#
# Contact:
# David Rager, ragerdl@cs.utexas.edu
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either v... | Shell |
#!/bin/bash
# ACL2 Parser for Java
# Copyright (C) 2013 Battelle Memorial Institute
#
# Contact:
# David Rager, ragerdl@cs.utexas.edu
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either v... | Shell |
#!/bin/bash
# ACL2 Parser for Java
# Copyright (C) 2013 Battelle Memorial Institute
#
# Contact:
# David Rager, ragerdl@cs.utexas.edu
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either v... | Shell |
#!/bin/bash
# ACL2 TPM Model
# Copyright (C) 2013 Battelle Memorial Institute
#
# Contact:
# David Rager, ragerdl@cs.utexas.edu
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either versio... | Shell |
#!/bin/bash
# ACL2 TPM Model
# Copyright (C) 2013 Battelle Memorial Institute
#
# Contact:
# David Rager, ragerdl@cs.utexas.edu
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either versio... | Shell |
#!/bin/bash
# ACL2 TPM Model
# Copyright (C) 2013 Battelle Memorial Institute
#
# Contact:
# David Rager, ragerdl@cs.utexas.edu
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either versio... | Shell |
#!/bin/bash
# ACL2 TPM Model
# Copyright (C) 2013 Battelle Memorial Institute
#
# Contact:
# David Rager, ragerdl@cs.utexas.edu
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either versio... | Shell |
#!/bin/bash
# ACL2 TPM Model
# Copyright (C) 2013 Battelle Memorial Institute
#
# Contact:
# David Rager, ragerdl@cs.utexas.edu
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either versio... | Shell |
#!/bin/bash
# ACL2 TPM Model
# Copyright (C) 2013 Battelle Memorial Institute
#
# Contact:
# David Rager, ragerdl@cs.utexas.edu
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either versio... | Shell |
# ACL2 Interpreter for Java
# Copyright (C) 2013 Battelle Memorial Institute
#
# Contact:
# David Rager, ragerdl@cs.utexas.edu
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2... | Shell |
#!/bin/rc
grep ' ' $* | awk '
$2 != "\"" {last = $4}
{printf("\t%s\t%s\n", $1, last)}
'
| Shell |
#!/bin/bash
cd $HOME
. ~/.bashrc
PLAN9=${PLAN9:-/usr/local/plan9}
$PLAN9/bin/9term -W600x800 &
| Shell |
#!/bin/bash
if [ -e ~/.bashrc ] ; then
. ~/.bashrc
fi
PLAN9=${PLAN9:-/usr/local/plan9}
bin=$PLAN9/bin
IFS=$'\n'
for file in $($bin/macargv)
do
# Blanks are problematic in filenames: just plumb
# the file's content.
if echo "$file" | grep -q " "
then
base=$(basename "$file" | sed 's/ /_/g')
attr="action=show... | Shell |
#!/usr/local/plan9/bin/rc
if (! ~ $DEBUG '') flag x +
if (~ $LPCLASS *sendEOT*) SENDEOT=1
if not SENDEOT=0
if (~ $OUTDEV -) OUTDEV=/dev/stdout
if (~ $#* 0) {
if (! ~ $DEBUG '') echo input file is stdin >[1=2]
lpsub process $LPPROC >$OUTDEV
if (~ $SENDEOT 1) echo -n `{ascii -t 4} > $OUTDEV
}
if not {
if (! ~ $DEBU... | Shell |
#!/usr/local/plan9/bin/rc
# fn sigexit { rm -f $LPSPOOL/$LPDEST/.$pid.* $LPSPOOL/$LPDEST/$pid.* $LPSPOOL/$LPDEST }
if (! ~ $DEBUG '') flag x +
echo $THIS_HOST $DEST_HOST
if (~ $THIS_HOST $DEST_HOST) {
if (! test -d $LPSPOOL/$LPDEST) {
mkdir $LPSPOOL/$LPDEST
chmod 777 $LPSPOOL/$LPDEST >[2]/dev/null
chmod +t $LPS... | Shell |
#!/usr/local/plan9/bin/rc
if (! ~ $DEBUG '') flag x +
if (~ $#* 0) *=''
for (j in $*) {
if (~ $j '' || test -f $j) {
lpinput $j lpsub process $LPPROC |
lpdsend -d$OUTDEV -tf -H$LPMACHID -P$LPUSERID $DEST_HOST >[2]$LPLOGDIR/$LPDEST^.st
}
if not {
echo $j cannot be opened >[1=2]
}
}
| Shell |
#!/usr/local/plan9/bin/rc
if (! ~ $DEBUG '') flag x +
echo transmission log:
if (test -r $LPLIB/log/$LPDEST^.st) {
tail -3 $LPLIB/log/$LPDEST^.st
echo
}
echo printer queue:
lpdsend -q -d$OUTDEV $DEST_HOST
| Shell |
#!/usr/local/plan9/bin/rc
if (! ~ $DEBUG '') flag x +
if (~ $THIS_HOST $DEST_HOST) {
if (test -f $LPLIB/log/$LPDEST^.st) {
echo status:
tail -3 $LPLIB/log/$LPDEST^.st
}
cd $LPSPOOL
if (test -d $LPDEST) {
once=''
for (i in `{lpsub sched $SCHED $LPDEST}) {
if (~ $once '') {
echo
echo queue on $THI... | Shell |
#!/usr/local/plan9/bin/rc
if (! ~ $DEBUG '') flag x +
cd $LPSPOOL
if (~ $#* 0) KILLARGS=`{sed 1q};
if not KILLARGS=$*;
if (test -d $LPDEST) {
for (i in $KILLARGS) {
for (j in `{lpsub sched $SCHED $LPDEST}) {
if (test -r $LPDEST/$j^id) {
STATLINE=`{cat $LPDEST/$j^id}
if (~ $STATLINE(1)^$STATLINE(3) $i)
... | Shell |
#!/usr/local/plan9/bin/rc
# convert CCITT G3 Fax format to PostScript
if (! ~ $DEBUG '') flag x +
PATCH='%%Patch from lp'
switch ($LPCLASS) {
case *hp4simx*;
PATCH=$PATCH'
%% set the default papertray to be the lower tray for HP4siMX printers
statusdict begin defaultpapertray end 1 ne {
statusdict begin
1 setdef... | Shell |
#!/usr/local/plan9/bin/rc
#
# we don't go through postscript, because to
# get to postscript, we send the pdf through gs!
# much easier to just go directly.
#
# usage: pdfgs pdffile [gsdev]
switch($#*) {
case 2
GSDEVICE=$2
case 1
GSDEVICE=`{echo $LPCLASS | sed 's/(.*\+)?gs!([^+]*)(\+.*)?/\2/'}
case *
echo 'usage:... | Shell |
#!/usr/local/plan9/bin/rc
# convert plan 9 image to PostScript
if (~ $DEBUG 1) flag x +
PATCH='%%Patch from lp'
switch ($LPCLASS) {
case *hp4simx*;
PATCH=$PATCH'
%% set the default papertray to be the lower tray for HP4siMX printers
statusdict begin defaultpapertray end 1 ne {
statusdict begin
1 setdefaultpapert... | Shell |
#!/usr/local/plan9/bin/rc
if (~ $DEBUG 1) flag x +
# convert Tex dvi to PostScript
PATCH='%!PS-Adobe-2.0'
switch ($LPCLASS) {
case *hp4simx*;
PATCH=$PATCH'
%% set the default papertray to be the lower tray for HP4siMX printers
statusdict begin defaultpapertray end 1 ne {
statusdict begin
1 setdefaultpapertray
... | Shell |
#!/usr/local/plan9/bin/rc
if (! ~ $DEBUG '') flag x +
PATCH='%!PS
%%Patch from lp'
switch ($LPCLASS) {
case *hp4simx*;
PATCH=$PATCH'
%% set the default papertray to be the lower tray for HP4siMX printers
statusdict begin defaultpapertray end 1 ne {
statusdict begin
1 setdefaultpapertray
end
} if'
}
for (i in ... | Shell |
#!/usr/local/plan9/bin/rc
# convert PDF output to PostScript
if (! ~ $DEBUG '') flag x +
PATCH='%!PS
%%Patch from lp'
switch ($LPCLASS) {
case *hp4simx*;
PATCH=$PATCH'
%% set the default papertray to be the lower tray for HP4siMX printers
statusdict begin defaultpapertray end 1 ne {
statusdict begin
1 setdefault... | Shell |
#!/usr/local/plan9/bin/rc
# converts a regular ascii file to PostScript
if (! ~ $DEBUG '') flag x +
PATCH='%%Patch from lp'
switch ($LPCLASS) {
case *hp4simx*;
PATCH=$PATCH'
%% set the default papertray to be the lower tray for HP4siMX printers
statusdict begin defaultpapertray end 1 ne {
statusdict begin
1 setd... | Shell |
#!/usr/local/plan9/bin/rc
# No processing, copy file from input to output
cat
| Shell |
#!/usr/local/plan9/bin/rc
# Tries to determine what type of file you are printing and do the correct
# thing with it.
# It currently knows about images, troff intermediate, and ascii files.
TMPFILE=/tmp/lp$pid
fn sigexit { rm -f $TMPFILE; }
if (! ~ $DEBUG '') flag x +
if (~ $LPCLASS *nohead*) NOHEAD=1
if (~ $LPCLASS *d... | Shell |
#!/usr/local/plan9/bin/rc
# extract pages $OLIST from postscript on stdin
if(~ $OLIST '')
exec cat
awk '
BEGIN {
x=ENVIRON["OLIST"];
gsub(/^-o/, "", x);
na = split(x, a, ",");
header = 1;
goodpage = 0;
}
header || goodpage {
print
}
/^%%EndSetup[ ]*$/ { header = 0; next }
/^%%Page:/ {
header = 0;
p=$2+... | Shell |
#!/usr/local/plan9/bin/rc
if (~ $DEBUG 1) flag x +
# convert troff output to PostScript
PATCH='%%Patch from lp'
switch ($LPCLASS) {
case *hp4simx*;
PATCH=$PATCH'
%% set the default papertray to be the lower tray for HP4siMX printers
statusdict begin defaultpapertray end 1 ne {
statusdict begin
1 setdefaultpapert... | Shell |
#!/usr/local/plan9/bin/rc
if (! ~ $DEBUG '') flag x +
REVFLAG=''
if (~ $LPCLASS *reverse*) {
switch ($REVERSE) {
case '';
REVFLAG=1
case 1;
REVFLAG=''
}
}
if (! ~ $REVFLAG '')
postreverse
if (~ $NOHEAD '') {
DATE=`{date}
face='FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF
FFFFFFFFFFFFFFF... | Shell |
#!/usr/local/plan9/bin/rc
# convert JPG to PostScript
if (! ~ $DEBUG '') flag x +
PATCH='%%Patch from lp'
switch ($LPCLASS) {
case *hp4simx*;
PATCH=$PATCH'
%% set the default papertray to be the lower tray for HP4siMX printers
statusdict begin defaultpapertray end 1 ne {
statusdict begin
1 setdefaultpapertray
... | Shell |
#!/usr/local/plan9/bin/rc
# convert CCITT G3 Fax format to PostScript
if (! ~ $DEBUG '') flag x +
PATCH='%%Patch from lp'
switch ($LPCLASS) {
case *hp4simx*;
PATCH=$PATCH'
%% set the default papertray to be the lower tray for HP4siMX printers
statusdict begin defaultpapertray end 1 ne {
statusdict begin
1 setdef... | Shell |
#!/usr/local/plan9/bin/rc
fn local {
GSDEVICE=`{echo $LPCLASS | 9 sed 's/(.*\+)?gs!([^+]*)(\+.*)?/\2/'}
echo gs $GSDEVICE
{
psdownload -f -H$PLAN9/postscript/font -mfontmap -plw+ \
< $LPDEST/$FILE(1) |
gs -sDEVICE'='$GSDEVICE -s'OUTPUTFILE='$OUTDEV -dSAFER -dNOPAUSE -dQUIET -dBATCH -
} >[2]$PRINTLOG
}
fn re... | Shell |
#!/usr/local/plan9/bin/rc
rfork s
if (! ~ $DEBUG '') flag x +
LPDELAY=60
if (! ~ $#* 2 && ! ~ $#* 3) {
echo 'usage generic local_cmd _remote_cmd [ success_cmd ]' >[1=2]
exit 'argument count'
}
LOCAL_CMD=$1
REMOTE_CMD=$2
SUCCESS_CMD=$3
# we don't want to make a LOCK file unless we are at the destination
# let th... | Shell |
#!/usr/local/plan9/bin/rc
fn local {
psdownload -f -H$PLAN9/postscript/font -mfontmap -plw+ \
< $LPDEST/$FILE(1) >$OUTDEV >[2]$PRINTLOG
}
fn remote {
{
echo -d$LPDEST -pnoproc -M$SCHEDLINE(1) -u$SCHEDLINE(2)
cat $LPDEST/$FILE
sleep 5
} | lpsend.rc $DEST_HOST
}
generic local remote ''
| Shell |
#!/usr/local/plan9/bin/rc
9 ls -ptr $* | 9 sed -n -e '/^[0-9][0-9]*\.[1-9][0-9]*$/p'
| Shell |
#!/usr/local/plan9/bin/rc
shift
sender=$1
shift
addr=$1
shift
fd=`{upas/aliasmail -f $sender}
switch($fd){
case *.*
;
case *
fd=YOURDOMAIN.DOM
}
exec upas/smtp -h $fd $addr $sender $*
| Shell |
#!/usr/local/plan9/bin/rc
rfork n
. 9.rc
# exit status matching:
#
# $discard - is really bad, refuse the message
# $accept - is really good, leave attachment alone
# anything else - rewrite attachment to have .suspect extension
#
# magic exit statuses known to vf
accept=10
discard=13
wrap=123 # anything but 10, ... | Shell |
#!/usr/local/plan9/bin/rc
# qmail sender machine user...
rfork s
upas/vf | upas/qer $PLAN9/mail/queue smtp $* || exit 'qer failed'
upas/runq -n 10 $PLAN9/mail/queue $PLAN9/mail/lib/remotemail </dev/null >/dev/null >[2=1] &
exit ''
| Shell |
#!/bin/rc
switch($#*){
case 0 1
echo usage: window '''minx miny maxx maxy''' cmd args ...
exit usage
}
rfork ns
if(mount $wsys /mnt/wsys N`{{echo $pid $1 }| sed 's/^ //g;s/ +/,/g'}){
shift
bind -b /mnt/wsys /dev
echo -n `{basename $1} > /dev/label >[2] /dev/null
@{
echo hang > /proc/^`{cat /dev/ppid}^/ctl
$*... | Shell |
#!/bin/rc
switch($#*){
case 0 1 2
echo usage: window '''minx miny maxx maxy''' '''minx miny maxx maxy''' cmd args ...
exit usage
}
rfork ns
if(mount $wsys /mnt/acid N`{{echo $pid $1 }| sed 's/^ //g;s/ +/,/g'}){
winid=`{cat /dev/winid}
echo transcript > /mnt/acid/label
echo transcript > /mnt/acid/cons
shift
}
if... | Shell |
#!/usr/local/plan9/bin/rc
. 9.rc
# creates the index used by lookman
>lookman.index
for(i in $PLAN9/man/man[0-9]*/[a-z0-9:]*.[0-9]*){
deroff -w_ < $i |
tr 'A-Z' 'a-z' |
sort -u |
comm -23 - junkwords |
sed 's@$@ '$i'@' >>lookman.index # stick file name on end of line
}
sort -o lookman.index lookman.index
| Shell |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.