Grep help

I'm trying to find and select an entire line where an end nested style marker is found. ~h.+$ will return me everything after the marker, and I can get everything up to the marker with ^.*?(~h) but I can't seem to combine the two. Any help would be appreciated.

I don't think those two queries are doing quite what you think. ^ is the beginning of paragraph marker, and $ is the end of paragraph marker, so you aren't selecting only a single line unless there is only one line in the paragraph.
^.*~h.*$ will find an entire paragraph that has at least one end nested style marker in it, regardless of where it is in the paragraph, but I don't believe there is any way to work line by line.

Similar Messages

  • Urgent Grep Help

    Hi guys,
    I've just had a brain fart and can't work this out. I need Grep help...like now, please....
    I need to search for Uppercase words and the begining of paragraphs so I can apply appropriate style...
    It a 700 page book and I don't want to do this manually...
    From this:
    To this:
    ARRRGGGHH...
    Marcus

    You might be fooled by those darn-it computer programs that take stuff literally.
    ^\u\u
    searches for two uppercase characters at the start of a paragraph. Is that the same as this?
    ^\L\L
    (search for Not Two Lowercase characters). No it isn't Check out these examples:
    A case where it works.
    An odd case where it will fail.
    The first will not be found by \u\u but will by \L\L. The second will not be found by either.
    I think the mix-up may be because of the difference in semantics between "uppercase" and "not lowercase". "Not lowercase" is uppercase, but also digits, space, punctuation and everything else (besides lowercase, then).

  • GREP help "apply style before the ' – ' and add return"

    Hi,
    I'm a newbie to GREP and not good at code so I need some help.
    I think if I new the code to say " apply Heading Paragraph style to text before the ' – ' and add return.
    Then it would work.
    I'm OK with looping nested paragraph styles.
    This is what I have currently got:
    Nerang Community Respite Centre – 5578 1668
    Provides a podiatry service.
    www.nerangrespite.org.au
    Ozcare Allied Health Program – 5569 6200 / Fax 5578 1331 
    Physiotherapy, occupational therapy, speech pathology, podiatry, dietetics and social work.
    www.ozcare.org.au
    And this is how I need it formatted with styles applied
    Nerang Community Respite Centre (Heading Paragraph Style)
    5578 1668 (Phone Paragraph Style)
    Provides a podiatry service. (Descrip Paragraph Style)
    www.nerangrespite.org.au (URL Paragraph Style)
    Ozcare Allied Health Program (Heading Paragraph Sty
    5569 6200 / Fax 5578 1331  (Phone Paragraph Style)
    Physiotherapy, occupational therapy, speech pathology, podiatry, dietetics and social work. (Descrip Paragraph Style)
    www.ozcare.org.au (URL Paragraph Style)

    Thanks for the help so far. It's working but I still to iron some things out.
    Replacing the em dash with a paragraph space or return is straight forward. But getting the styles applied while doing that is not working.
    Also I want to split the phone and fax separated by the '/" onto separate lines.
    1. Not all the entries are the same see below example.
    This is what I have currently got
    ^p = paragraph
    Nerang Community Respite Centre – 5578 1668^p
    Provides a podiatry service.^p
    www.nerangrespite.org.au^p
    ^p
    Ozcare Allied Health Program – 5569 6200 / Fax 5578 1331^p
    Physiotherapy, occupational therapy, speech pathology, podiatry, dietetics and social work.
    www.ozcare.org.au^p
    Volunteering Gold Coast – 5591 8388^p
    Cerebral Palsy League of Queensland – 5532 2088 / Fax 5591 7725^p
    Provides community access to people with Cerebral Palsy and related disabilities.^p
    And this is how I need it formatted with styles applied
    Nerang Community Respite Centre (Heading Paragraph Style)
    5578 1668 (Phone Paragraph Style)
    Provides a podiatry service. (Descrip Paragraph Style)
    www.nerangrespite.org.au (URL Paragraph Style)
    Ozcare Allied Health Program (Heading Paragraph Style)
    5569 6200 (Phone Paragraph Style)
    Fax 5578 1331  (Fax Paragraph Style)
    Physiotherapy, occupational therapy, speech pathology, podiatry, dietetics and social work. (Descrip Paragraph Style)
    www.ozcare.org.au (URL Paragraph Style)
    Volunteering Gold Coast (Heading Paragraph Style)
    5591 8388 (Phone Paragraph Style)
    Cerebral Palsy League of Queensland
    5532 2088 (Phone Paragraph Style)
    Fax 5591 7725 (Fax Paragraph Style)
    Provides community access to people with Cerebral Palsy and related disabilities. (Descrip Paragraph Style)

  • Need some 'Find with Grep' help

    Hi, all I have a long name directory,
    and I want to find all the middle innitials in the names
    so that I can add a dot to them.
    right now I have the names like this:
    Jon A Dow
    I want to make them all into
    Jon A. Dow
    I thought If I could search for the Capitol letters with a space after them
    that could work because the middle initials all have a single space following them.
    Any help would be greatly appreciated.
    PS
    First time on the Forum,
    if I'm posting in the wrong place please let me know

    This was my first reply- for some reason it didn't post-
    by the way where is reply button it seems to have vanished
    Thanks Jongware!
    works perfect for my needs.
    I have two more questions (if any one is up for it)
    how would I replace the double name with only one instance
    of a name so that:
    Jon Smith
    Jon Smith
    becomes:
    Jon Smith
    is it:  "$1"   ? (according to the logic of my first question)
    also I'm looking for an automated way to color the names on the list. (there are more than 8,000 names)
    for example: Every other name becomes 50% K and every third name becomes 30% K (?)
    any and all answers are greatly appreciated,
    also If I'm mis-stepping forum bounds please alert me and I will repost where my question belongs.
    Thanks again

  • [SOLVED] makepkg gives "grep: invalid max count"

    [thiderman@justitia dunst-git]$ makepkg
    ==> Making package: dunst-git 1.0.0.554.92cda43-1 (Sat Dec 28 16:52:48 CET 2013)
    ==> Checking runtime dependencies...
    ==> Checking buildtime dependencies...
    ==> Retrieving sources...
    -> Updating dunst git repo...
    Fetching origin
    ==> Validating source files with md5sums...
    dunst ... Skipped
    ==> Validating source files with sha256sums...
    dunst ... Skipped
    ==> Extracting sources...
    -> Creating working copy of dunst git repo...
    Cloning into 'dunst'...
    done.
    ==> Starting pkgver()...
    ==> Starting prepare()...
    ==> Removing existing pkg/ directory...
    ==> Starting build()...
    dunst build options:
    CFLAGS = -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector --param=ssp-buffer-size=4 -g --std=c99 -pedantic -Wall -Wno-overlength-strings -Os -D_FORTIFY_SOURCE=2 -D_BSD_SOURCE -DVERSION="v1.0.0-30-g92cda43" -DXINERAMA -pthread -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16
    LDFLAGS = -Wl,-O1,--sort-common,--as-needed,-z,relro -lm -L/usr/lib/X11 -lXss -lXinerama -ldbus-1 -lX11 -lfreetype -lXext -lXft -lXss -lgio-2.0 -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo -lxdg-basedir
    CC = cc
    creating config.h from config.def.h
    CC -c x.c
    grep: invalid max count
    Makefile:31: recipe for target 'x.o' failed
    make: *** [x.o] Error 2
    ==> ERROR: A failure occurred in build().
    Aborting...
    [thiderman@justitia dunst-git]$
    This has happened to me for a while. I've tried building st-git and dunst-git from the AUR, and they both die with similar stacktraces. The output shown above is run in a bash with stock configuration, so no aliases or other shell trickery is going on. I've searched both source trees, but can't even find any mention of "grep" in any of them.
    Googling suggested that a file with a name starting with "-m" has been found, but I can't find any of these either.
    wat do?
    Last edited by Daethorian (2013-12-28 17:16:25)

    Trilby wrote:See my edit above - but also I'd suggest removing all the "@" signs from the makefile to see what the actual command is that is failing.
    It looks pretty much exactly the same:
    dunst build options:
    CFLAGS = -g --std=c99 -pedantic -Wall -Wno-overlength-strings -Os -D_BSD_SOURCE -DVERSION="v1.0.0-30-g92cda43" -DXINERAMA -pthread -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16
    LDFLAGS = -lm -L -lXss -lXinerama -ldbus-1 -lX11 -lfreetype -lXext -lXft -lXss -lgio-2.0 -lpangocairo-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lcairo -lxdg-basedir
    CC = cc
    cc -g --std=c99 -pedantic -Wall -Wno-overlength-strings -Os -D_BSD_SOURCE -DVERSION="v1.0.0-30-g92cda43" -DXINERAMA -pthread -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libdrm -I/usr/include/libpng16
    CC -c x.c
    grep: invalid option -- 'g'
    Usage: grep [OPTION]... PATTERN [FILE]...
    Try 'grep --help' for more information.
    Makefile:31: recipe for target 'x.o' failed
    make: *** [x.o] Error 2

  • ICloud/Apple ID authentication mistery

    Short question is.
    Why does the AFP connection to my Mac-Lion bypass the password when connecting from another Mac signed in iCloud?
    Here are some details.
    1. The Mac-Lion is off-cloud and I reset the keychain many times.
    2. I am connecting from the account "xyz" on the other Mac, which is signed in the same iCloud account that the old Mac used to be signed in.
    3. It connects to the account "xyz" on Mac-Lion , bypassing the login / password prompt.
    4. If I sign off iCloud on the other Mac, I do get the prompt asking to which account on Mac-Lion I want to connect and to enter the password.
    5. If I sign on again, it bypasses the password again.
    6. This is the only thing that the console tells me: 3/23/15 9:53:25.917 PM Firewall: Allow AppleFileServer connecting from 192.168.1.110:61427 to port 548 proto=6
    No amount of brute force search/grep helped. There seems to be no trace of my Apple ID on Mac-Lion, at least not in the searchable files.
    Yet, there must a permission buried somewhere on Mac-Lion that grant access to the incoming connections from my Apple ID. Where can that be and how can I reset it? 
    Thank you,

    If your device is signed into an old ID that is an earlier version of the ID you want to sign in with, do the following:
    If you are using iMessage and FaceTime, make sure you are signed into these services with your current ID.  If they are signed into the old ID, go to Settings>Messages>Send & Receive and Settings>FaceTime, tap the ID, sign out, then sign back in with your current ID.
    Then temporarily recreate the old ID by going to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  (You should not have to verify the old email account so it doesn’t matter if you no longer have access to it.)  Now go to Settings>iCloud, turn off Find My iDevice and enter your current password when prompted (even though it prompts you for the password for your old ID).  Then save any photo stream photos that you wish to keep to your camera roll (unless you are using iCloud Photo Library).  When finished go to Settings>iCloud, tap Sign Out (or Delete Account if you are not running iOS 8) and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address back to the way it was.  Now you can go to Settings>iCloud and sign back in with your current iCloud ID and password (your data will download back to your device).

  • Zedboard BSP build fails out of the box

    Hello,
    I downloaded the Petalinux 2015.2 tools and the Avnet Zedboard 2015.2 BSP
    However, as soon as I try petalinux-build after the creation of the project, i get the error:
    [...I skip the initial messages which all look correct...]
    [INFO ] Update and install vmlinux image
    [INFO ] vmlinux linux/kernel
    [INFO ] install linux/kernel
    [INFO ] package zImage
    [INFO ] zImage linux/kernel
    [INFO ] install linux/kernel
    [ERROR] ERROR: Invalid ELF file '/home/lopez/Petalinux-Projects/Avnet-Digilent-ZedBoard-2015.2/images/linux/vmlinux'
    [ERROR] make[1]: *** [package-subsystem-FIT] Errore 255
    ERROR: Failed to build linux.
    Also, if I try to boot the prebuilt image with petalinux-boot --qemu --prebuilt 3 I get:
    INFO: The image provided is a zImage
    INFO: Set QEMU tftp to /home/lopez/Petalinux-Projects/Avnet-Digilent-ZedBoard-2015.2/images/linux
    Uso: grep [OPZIONE]... MODELLO [FILE]...
    Usare "grep --help" per ulteriori informazioni.
    INFO: TCP PORT is free
    INFO: Starting arm QEMU
    INFO: qemu-system-aarch64 -L /opt/Xilinx/petalinux-v2015.2-final/etc/qemu -M arm-generic-fdt-plnx -machine linux=on -display none -kernel /tmp/tmp.NrxdGEgjgl -gdb tcp::9000 -dtb /tmp/tmp.pkk2bd9Zfu -tftp /home/lopez/Petalinux-Projects/Avnet-Digilent-ZedBoard-2015.2/images/linux
    Xilinx QEMU Jul 13 2015 04:08:08.
    qemu-system-aarch64: Unable to get size of device tree file '/tmp/tmp.pkk2bd9Zfu'
    qemu-system-aarch64: Error: Unable to load Device Tree /tmp/tmp.pkk2bd9Zfu
    I don't know if the error is connected to the wrong grep usage at the beginning of the flow.
    Anybody can help? Much appreciated thanks
    Giorgio

    Also seeing this issue on custom hardware.
    I'm using a VM to develop:
    Guest System: Ubuntu 14.04.2 LTS
    Host System: Windows 7 Professional SP 1 64 bit
    In the terminal output, I'm getting:
    [INFO ] package rootfs.cpio to /home/bharris/plnx/plnx.plnx/images/linux
    [INFO ] Update and install vmlinux image
    [INFO ] vmlinux linux/kernel
    [INFO ] install linux/kernel
    [INFO ] package zImage
    [INFO ] zImage linux/kernel
    [INFO ] install linux/kernel
    [ERROR] ERROR: Unable to create FIT image
    [ERROR] make[1]: *** [package-subsystem-FIT] Error 255
    ERROR: Failed to build linux
    In build/build.log:
    [ALL ] kernel_loadaddr=$(grep -e "^CONFIG_SUBSYSTEM_MEMORY_.*_KERNEL_BASEADDR=" "/home/bharris/plnx/plnx.plnx/subsystems/linux/config" | head -n1 | cut -d "=" -f 2 ); [ ! -z "${kernel_loadaddr}" ] && kernel_loadaddr="--kernel_loadaddr ${kernel_loadaddr}";  .....
    [ALL ] mkimage: Can't open /home/bharris/plnx/plnx.plnx/images/linux/image.ub.tmp: No such file or directory
    [ERROR] ERROR: Unable to create FIT image
    [ERROR] make[1]: *** [package-subsystem-FIT] Error 255
    [ALL ] make[1]: Leaving directory `/home/bharris/plnx/plnx.plnx/build/linux'
    [ALL ] make: *** [package] Error 2
    [ALL ] make: Leaving directory `/home/bharris/plnx/plnx.plnx/build/linux'
    I've attached the build.log. Has anyone else seen this kind of output and managed to resolve the problem?
    I've tried the various package installation recommendations; none have worked so far. What's really bothering me is that I was using this system just a few days ago and it did several petalinux builds absolutely fine..
    Cheers,
    Ben

  • Error in Startsap in linux 64 bit

    Dear All,
    when i perform startsap in linux 64 bit message coming like that.
    [root@ram ~]# su - prdadm
    ram:prdadm 1> startsap
    ping: unknown host fam
    Usage: grep [OPTION]... PATTERN [FILE]...
    Try `grep --help' for more information.
    Checking PRD Database
    Database is not available via R3trans
    Database PRD must be started on remote server
    Log on to remote server and start database
    ram:prdadm 2> ping ram(HOST NAME)ip of server (192.168.1.1)
    PING ram.yahoo.co.in (192.168.1.1) 56(84) bytes of data.
    64 bytes from ram.yahoo.co.in (192.168.1.1): icmp_seq=1 ttl=64 time=0.030 ms
    64 bytes from ram.yahoo.co.in (192.168.1.1): icmp_seq=2 ttl=64 time=0.037 ms
    64 bytes from ram.yahoo.co.in (192.168.1.1): icmp_seq=3 ttl=64 time=0.035 ms
    LOG OF STARTSAP
    Trace of system startup/check of SAP System PRD on Fri Sep 23 17:49:37 IST 2011
    Called command: /usr/sap/PRD/SYS/exe/run/startsap start
    Starting Startup Agent sapstartsrv
    Instance Service on host ram started
    Starting SAP Instance DVEBMGS00
    SAP-R/3-Startup Program Rel 701 V1.8 (2003/04/24)
    Starting at 2011/09/23 17:49:48
    Startup Profile: "/usr/sap/PRD/SYS/profile/START_DVEBMGS00_ram"
    Setup Environment Variables
    (5591) SETENV LD_LIBRARY_PATH=/usr/sap/PRD/DVEBMGS00/exe:/usr/sap/PRD/DVEBMGS00/exe:/usr/sap/PRD/SYS/exe/run:/oracle/client/10x_64/instantclient
    (5591) SETENV SHLIB_PATH=/usr/sap/PRD/DVEBMGS00/exe:
    (5591) SETENV LIBPATH=/usr/sap/PRD/DVEBMGS00/exe:
    Execute Pre-Startup Commands
    (5592) Local: /usr/sap/PRD/SYS/exe/run/sapcpe pf=/usr/sap/PRD/SYS/profile/PRD_DVEBMGS00_ram
    (5591) system(/usr/sap/PRD/SYS/exe/run/sapcpe pf=/usr/sap/PRD/SYS/profile/PRD_DVEBMGS00_ram) returns 4
    (5600) Local: /usr/sap/PRD/DVEBMGS00/exe/sapmscsa pf=/usr/sap/PRD/SYS/profile/PRD_DVEBMGS00_ram -n
    /usr/sap/PRD/DVEBMGS00/exe/sapmscsa: make new mode. SCSA currently non existent.
    sapcscsa: SCSA defined. sapscsaId == 589839 == 0009000f
    sapcscsa: SCSA attached at address 2b9f00759000
    sapcscsa: SCSA initialized.
    rslgwr1(21): Searching for overlap point in pre-existing SysLog file...
    /usr/sap/PRD/DVEBMGS00/exe/sapmscsa: finished.
    (5601) Local: rm -f ms.sapPRD_DVEBMGS00
    (5602) Local: ln -s -f /usr/sap/PRD/DVEBMGS00/exe/msg_server ms.sapPRD_DVEBMGS00
    (5603) Local: rm -f dw.sapPRD_DVEBMGS00
    (5604) Local: ln -s -f /usr/sap/PRD/DVEBMGS00/exe/disp+work dw.sapPRD_DVEBMGS00
    (5605) Local: rm -f co.sapPRD_DVEBMGS00
    (5606) Local: ln -s -f /usr/sap/PRD/DVEBMGS00/exe/rslgcoll co.sapPRD_DVEBMGS00
    (5607) Local: rm -f se.sapPRD_DVEBMGS00
    (5608) Local: ln -s -f /usr/sap/PRD/DVEBMGS00/exe/rslgsend se.sapPRD_DVEBMGS00
    (5609) Local: rm -f ig.sapPRD_DVEBMGS00
    (5610) Local: ln -s -f /usr/sap/PRD/DVEBMGS00/exe/igswd_mt ig.sapPRD_DVEBMGS00
    Starting Programs
    23.09.2011 17:49:49
    ShmDetach
    OK
    (5614) Starting: local ms.sapPRD_DVEBMGS00 pf=/usr/sap/PRD/SYS/profile/PRD_DVEBMGS00_ram
    (5615) Starting: local dw.sapPRD_DVEBMGS00 pf=/usr/sap/PRD/SYS/profile/PRD_DVEBMGS00_ram
    (5616) Starting: local co.sapPRD_DVEBMGS00 pf=/usr/sap/PRD/SYS/profile/PRD_DVEBMGS00_ram -F
    (5617) Starting: local se.sapPRD_DVEBMGS00 pf=/usr/sap/PRD/SYS/profile/PRD_DVEBMGS00_ram -F
    (5618) Starting: local ig.sapPRD_DVEBMGS00 -mode=profile pf=/usr/sap/PRD/SYS/profile/PRD_DVEBMGS00_ram
    (5591) Waiting for Child Processes to terminate.
    Instance on host ram started
    (5591) **** 2011/09/23 18:27:49 Caught Signal to Stop all Programs. ****
    (5591) Parent Shutdown at 2011/09/23 18:27:51
    (5591) Stop Child Process: 5618
    (5591) Wait 300 sec for Process 5618 terminating...
    (5591) Stop Child Process: 5617
    (5591) Wait 300 sec for Process 5617 terminating...
    (5591) Stop Child Process: 5616
    (5591) Wait 300 sec for Process 5616 terminating...
    (5591) Stop Child Process: 5615
    (5591) Wait 300 sec for Process 5615 terminating...
    (5591) Stop Child Process: 5614
    (5591) Wait 300 sec for Process 5614 terminating...
    Execute Post-Shutdown Commands
    23.09.2011 18:28:30
    ShmDetach
    OK
    (5591) Exiting with Return-Code 0. (Ok)

    hi,
    1.  >>ping: unknown host fam
        your hostname: ram or fam ?
    2.  >>Database is not available via R3trans
         >> Database PRD must be started on remote server
        >> Log on to remote server and start database
    check your db host, and make sure DB is up and running. Run R3trans -d, and check the generated trans.log
    3.
    >>(5614) Starting: local ms.sapPRD_DVEBMGS00 pf=/usr/sap/PRD/SYS/profile/PRD_DVEBMGS00_ram
    >>(5615) Starting: local dw.sapPRD_DVEBMGS00 pf=/usr/sap/PRD/SYS/profile/PRD_DVEBMGS00_ram
    >>(5616) Starting: local co.sapPRD_DVEBMGS00 pf=/usr/sap/PRD/SYS/profile/PRD_DVEBMGS00_ram -F
    >>(5617) Starting: local se.sapPRD_DVEBMGS00 pf=/usr/sap/PRD/SYS/profile/PRD_DVEBMGS00_ram -F
    >>(5618) Starting: local ig.sapPRD_DVEBMGS00 -mode=profile pf=/usr/sap/PRD/SYS/profile/PRD_DVEBMGS00_ram
    >>(5591) Waiting for Child Processes to terminate.
    >>Instance on host ram started
    >>(5591) **** 2011/09/23 18:27:49 Caught Signal to Stop all Programs. ****
    program termination. check dev_ms, dev_disp. I guess it could be signal 2 caught.
    check linux os event log, and run sappfpar check pf=<instance profile> for shared memory check.
    Regards,
    Vincent

  • Creapkg - Create pkgs easyly

    Hi!
    I made a script that it lets you install software in your PC cleanly, creating a pkg.
    You must configure, compile and finally install the program in the directory "pkg" and run "creapkg". An example:
    ./configure --prefix=/usr
    make
    make prefix=`pwd`/pkg install
    creapkg
    After you do this, the script will ask you some questions and will create a package in ./pkg.
    You can find PKGBUILD in aur.
    I'll wait your opinions.
    Thanks and sorry for my poor english.
    <B>UPDATE</B>
    Version 0.3
    =======
    I added some options and fix some bugs. Now you can compile/install an autoconf program easyly.
    [root@localhost thinkeramik-3.2.1]# creapkg -h
    creapkg 0.3
    usage: /usr/bin/creapkg pkgname pkgversion [OPTIONS]
    OPTIONS:
    -i, --install Install package after successful build
    -r <release> Package release
    -d <description> Package description
    -u <url> Program URL
    -l <license> Program license
    -p <packager> Package packager
    -c, --cleanbuild Clean building directory
    -n, --nocolor Disable colorized output messages
    -h, --help Show this help
    BUILDING OPTIONS:
    -a, --autoconf Build autoconf program
    -w <prefix> Set program prefix
    An example:
    [root@localhost thinkeramik-3.2.1]# creapkg kde-theme-thinkeramik 3.2.1 -iaw /opt/kde
    ==> Building program with autoconf...
    ==> Running configure script...
    ==> Configure script executed successful!
    ==> Starting compilation...
    ==> Compiling...
    ==> Compilation successful!
    ==> Locating files in pkg directory...
    ==> Location successful!
    ==> Building a package for kde-theme-thinkeramik 3.2.1...
    ==> Generating .FILELIST...
    ==> Generating .PKGINFO...
    ==> Compressing package...
    .PKGINFO
    .FILELIST
    opt/
    opt/kde/
    opt/kde/lib/
    opt/kde/lib/kde3/
    opt/kde/lib/kde3/kwin_thinkeramik_config.la
    opt/kde/lib/kde3/kwin_thinkeramik_config.so
    opt/kde/lib/kde3/kwin3_thinkeramik.la
    opt/kde/lib/kde3/kwin3_thinkeramik.so
    opt/kde/lib/kde3/kstyle_thinkeramik_config.la
    opt/kde/lib/kde3/kstyle_thinkeramik_config.so
    opt/kde/lib/kde3/plugins/
    opt/kde/lib/kde3/plugins/styles/
    opt/kde/lib/kde3/plugins/styles/thinkeramik.la
    opt/kde/lib/kde3/plugins/styles/thinkeramik.so
    opt/kde/share/
    opt/kde/share/apps/
    opt/kde/share/apps/kwin/
    opt/kde/share/apps/kwin/thinkeramik.desktop
    opt/kde/share/apps/kstyle/
    opt/kde/share/apps/kstyle/themes/
    opt/kde/share/apps/kstyle/themes/thinkeramik.themerc
    opt/kde/share/apps/kdisplay/
    opt/kde/share/apps/kdisplay/color-schemes/
    opt/kde/share/apps/kdisplay/color-schemes/thinkeramik.kcsrc
    opt/kde/share/apps/kdisplay/color-schemes/thinkeramik-II.kcsrc
    ==> The package kde-theme-thinkeramik 3.2.1-1 has been built successful (Sun Aug 14 16:32:59 2005)
    ==> You can find the package in /home/moret/src/thinkeramik-3.2.1/pkg/kde-theme-thinkeramik-3.2.1-1.pkg.tar.gz
    ==> Installing kde-theme-thinkeramik-3.2.1-1...
    loading package data... done.
    checking for file conflicts... done.
    installing kde-theme-thinkeramik... done.
    Opinions please!

    I did update (and rename) my script. it's now allmost feature complete, but I need a nice error function (printing in red) and the normal make install command (I'm too lazy to look it up ).
    You now can build a package of python programms or just package a specific directory (usefull for scripts).
    Of course I'am not responsible for any damage done by this script, bla, bla, bla.
    examples:
    the installation of autopkg as a package
    [11:26] police:pypkg ls
    autopkg
    [11:26] police:pypkg mkdir -p pkg/usr/bin
    [11:26] police:pypkg cp autopkg pkg/usr/bin/
    [11:26] police:pypkg autopkg autopkg 0.2 "a package creating tool for archlinux" --pkg-dir pkg/ --install
    ==> ::running the setup
    ==> warning: no build command issued
    ==> ::generating the filelist
    ==> ::trying to retrive information about the package
    ==> ::generating the package info
    ==> ::compressing the package
    ==> installing package
    loading package data... done.
    checking for file conflicts... done.
    upgrading autopkg... done.
    ==> ::finished
    [11:27] police:pypkg
    creating a package for pylinda
    [11:30] police:linda ls
    linda-0.5.1.tar.gz
    [11:30] police:linda tar xzf linda-0.5.1.tar.gz
    [11:30] police:linda cd linda-0.5.1
    [11:30] police:linda-0.5.1 autopkg pylinda 0.5.1 "an implementation of a linda system in python" --python
    ==> ::creating a temporary directory
    ==> ::running the setup
    ==> ::generating the filelist
    ==> ::trying to retrive information about the package
    ==> ::generating the package info
    ==> ::compressing the package
    ==> ::removing package directory
    ==> ::finished
    [11:31] police:linda-0.5.1
    the script (autopkg)
    #!/bin/bash
    # 12.08.05 8:00 am created file
    [ -f /etc/makepkg.conf ] && source /etc/makepkg.conf
    # infos about this script
    NAME="pypkg"
    VERSION="0.2"
    # global vars - w/ defaults
    pkg="" # the package directory
    pkgname="" # the name of the package
    pkgver="" # the version of the package
    pkgdesc="" # the description of the package
    pkgrel="1" # the package release
    builddate=`LC_ALL= ; LANG= ; date -u "+%a %b %e %H:%M:%S %Y"`
    startdir=$(pwd) # the directory the build has started
    allready_installed="n" # wether the package was allready installed
    BUILD=""
    INSTALL="n"
    NO_TMP="n"
    # some functions
    function msg() {
    #if [ "$USE_COLOR" = "Y" -o "$USE_COLOR" = "y" ]; then
    # echo -e "33[1;32m==>33[1;0m 33[1;1m$*33[1;0m" >&2
    #else
    echo "==> $@" >&2
    #fi
    function gen_filelist(){
    # 12.8.05 8:07 am created function
    # args: $1 target file
    msg "::generating the filelist"
    cd $pkg
    tar cvf /dev/null * | sort | >.FILELIST
    function create_tmp_dir(){
    # 12.8.05 8:07 am created function
    if [ $NO_TMP == "y" ]; then return; fi
    msg "::creating a temporary directory"
    pkg=$(mktemp -d -p "$startdir")
    function run_setup(){
    # 12.8.05 8:07 am created function
    msg "::running the setup"
    cd $startdir
    if [ "$BUILD" == "python" ]
    then
    python setup.py install --prefix="$pkg/usr"
    ) > /dev/null || (echo " ::error build failed"; exit -1)
    elif [ "$BUILD" == "make" ]
    then
    msg "::currently unsported";
    remove_tmp_dir
    exit
    #make install
    #) > /dev/null || (echo "::error build failed"; exit -1)
    elif [ "$BUILD" == "use" ]
    then
    ($USE) > /dev/null || (echo "::error build failed"; exit -1)
    else
    msg "warning: no build command issued"
    fi
    function gen_pkginfo(){
    # 12.08.05 8:07 am created function
    msg "::generating the package info"
    cd $pkg
    touch .PKGINFO
    size=$(du -cb $pkg | tail -n 1 | awk '{print $1}')
    echo "size = $size" >> .PKGINFO
    echo "# Generated by pypkg $version" >> .PKGINFO
    echo "# $builddate" >> .PKGINFO
    echo "pkgname = $pkgname" >> .PKGINFO
    echo "pkgver = ${pkgver}-${pkgrel}" >> .PKGINFO
    echo "pkgdesc = $pkgdesc" >> .PKGINFO
    echo "builddate = $builddate" >> .PKGINFO
    if [ "$CARCH" != "" ]; then
    echo "arch = $CARCH" >> .PKGINFO
    fi
    function compress_pkg(){
    # 12.08.05 8:07 am created function
    msg "::compressing the package"
    cd $pkg
    pkg_file="$startdir/$pkgname-$pkgver-$pkgrel.pkg.tar.gz"
    tar czf $pkg_file .PKGINFO .FILELIST *
    function remove_tmp_dir(){
    # 12.08.05 8:07 am created function
    if [ $NO_TMP == "y" ]; then return; fi
    msg "::removing package directory"
    cd $startdir
    rm -r $pkg
    function __get_info(){
    # 12.08.05 8:30 am created function
    pacman -Qi $pkgname | grep $1 | sed 's/.*:s*/(w.*)/1/'
    function get_pkginfo(){
    # 12.08.05 8:30 am created function
    # if the package is allready installed, retrive it's information
    msg "::trying to retrive information about the package"
    (pacman -Qi $pkgname 2>/dev/null > /dev/null && installed=y) || installed=n
    if [ -z "$pkgdesc" ]
    then
    if [ "$installed" == "y" ]
    then
    pkgdesc=$(__get_info 'Description')
    else
    pkgdesc="Autogenerated by autopkg"
    fi
    fi
    if [ -z "$pkgrel" ]
    then
    if [ "$installed" == "y" ]
    then
    pkgrel=$(__get_info 'Version' | sed 's/-(d*)/1/')
    else
    pkgrel=1
    fi
    fi
    function install_pkg(){
    # 12.08.05 09:20 created function
    if [ $INSTALL != 'y' ] || [ -z "$pkg_file" ]; then return; fi
    msg "installing package"
    sudo pacman -U $pkg_file
    function mk_abs_path(){
    if [ ${1:0:1} == "/" ]
    then
    echo $1
    else
    echo $(pwd)/$1
    fi
    # parse the options
    function usage(){
    # 12.08.05 08:50 created function
    echo "usage: $0 pkgname pkgver [pkgdesc] [pkgrel] OPTIONS"
    echo "OPTIONS: "
    echo "--python installs the programm via distutils"
    echo "--make installs the programm via make"
    echo "--use CMD installs the programm via CMD"
    echo " (has to be the last option)"
    echo "--pkg-dir DIR uses the directory pkg for package installation"
    echo " (else a temporary director is used)"
    echo "--install directly installs the programm via pacman (needs sudo)"
    echo "--help prints this message"
    function set_non_build(){
    # 12.08.05 08:40 created function
    # usage set_non_build option arg
    if [ -z "$1" ] || [ $# -lt 2 ]
    then
    return -1
    fi
    if [ "${1:0:2}" != "--" ]
    then
    eval "$2="$1""
    return 0
    fi
    return -1
    #if [ $# -lt 2 ] || [ -z "$(echo $@ | grep -- --help)" ]
    #then
    # usage; exit
    #fi
    pkgname=$1
    pkgver=$2
    shift 2
    set_non_build "$1" "pkgdesc" && shift
    set_non_build "$1" "pkgrel" && shift
    while [ $# -ne 0 ]
    do
    case $1 in
    --python) BUILD="python";;
    --make) BUILD="make";;
    --use) BUILD="use";shift;USE="$@";exit;;
    --pkg-dir) NO_TMP="y";shift;pkg=$(mk_abs_path "$1");;
    --install) INSTALL="y";;
    *) usage; exit;;
    esac
    shift
    done
    create_tmp_dir
    run_setup || exit
    gen_filelist
    get_pkginfo
    gen_pkginfo
    compress_pkg
    remove_tmp_dir
    install_pkg
    msg "::finished"

  • Turn off bluetooth via applescript when power is disconnected

    Hello all
    I've been fallowing this older thread here:
    http://discussions.apple.com/thread.jspa?messageID=2109999
    I've followed the instructions of the post,but when I run the script I get this
    error:
    Usage: grep [OPTION]... PATTERN [FILE]...
    Try `grep --help' for more information.
    sh: line 1: Applications: command not found
    Does anyone know if there is an updated version of this type of script or
    if this can be corrected?
    Thanks

    Hello
    I'm afraid that the code by Michael Henley in the referred thread has been altered by the fora software introduced in 2007. Perhaps the ac_power() handler should be read as -
    to ac_power()
    (do shell script "pmset -g | grep \\*") starts with "AC Power"
    end ac_power
    Good luck,
    H
    PS. Please copy code from this web page, not from subscribed email text, for I escaped some character for posting; namely \.

  • Bash: command not found after piping

    Hi,
    I'm trying something quite commonly found in an Unix environment, namely piping the output of one command into the input of a subsequent one, eg.
       bash$ ps ax | grep -i bash
    But unfortunately I'm receiving--and now comes the most curious part--most of the times (not always!!) an error message
       bash: grep: command not found
    When calling grep directly
       bash$ grep
    the resulting output is
       Usage: grep [OPTION]... PATTERN [FILE]...
       Try `grep --help' for more information.
    "which"-ing the commands
       bash$ which bash ps grep
    results in
       /bin/bash
       /bin/ps
       /usr/bin/grep
    Cheers,
    MMHein

    Good, you tried a different shell.  sh and bash are essentially the same executable on Mac OS X.
    Did you try a new user account?  What were those results?
    Have you tried installing your own bash?  Either build from sources, or use something like MacPorts.org to install one already configured for Mac OS X.
    You also have ksh and zsh if they happen to rock your boat (see /etc/shells for a list of installed shells).
    I think both Linc an dI agree that we have never seen this situation before either, which is why we suspect something has become corrupt.  The "Nuke and Pave" approach tends to eliminate that possibility.  But since you have lots of Unix experience (even though you missed a few Unix flavors ), and want to find the root cause, then you need to start doing tests that eliminate components.
    The shells on my Mac OS X 10.7.2 Lion system have the following chksum's
    cksum /bin/*sh
    188949626 1371648 /bin/bash
    1672788767 772992 /bin/csh
    4164734636 2180736 /bin/ksh
    1711289041 1371712 /bin/sh
    1672788767 772992 /bin/tcsh
    2366092939 1103984 /bin/zsh
    I would expect yours to be identical.  But that does not take into account any libraries used.  And if you have the same values, then you need to look at something else (again, a new account can go a long way to eliminating things in your environment, or pointing to a system component).

  • More help with GREP needed

    I have been attempting to create some nested styles.
    So far, I am getting the hang of it.
    I have created a grep style that will make all text after the word "NOTE: " into italic. Also, I have grep style that makes all text that is "FIGURE +\d+\d" into bold text.
    The problem I have is that if the word "FIGURE " etc. is in the italicized note text, then it will not become bold.
    For example: "Operate the switch to begin the process (FIGURE 3-3). Make sure guards are closed (refer to FIGURE 3-1)."
    That works fine, and "FIGURE " is bold. However, when I change the sentence by adding "NOTE: Make sure guards... " it all becomes italic, and I loose the bold on "FIGURE 3-1"
    So, is there a way to augment my italic grep with some kind of inclusion... as if I were saying "if "FIGURE +\d+\d" make that is bold italic"
    sorry for the long-winded attempt to describe what I want to do.
    Thanks in advance for help.
    RPP

    RPP,
    The trouble is that in GREP style you can find text but not formatting, so you can't say something like "find FIGURE only when it's italic". In the Find/Change dialog you can, but in GREP styles you can't.
    You also can't say "look for FIGURE if it's preceded by NOTE: and any characters in between". Unfortunately, lookbehind can't cope with variable-length text. So if you always have "NOTE: Refer to FIGURE ...", then you can use lookbehind and you set-up would be this:
    apply italic to FIGURE [-\d]+
    apply bold to NOTE:.+
    apply bold-italic to (?<=NOTE: Refer to )FIGURE [-\d]+
    The first parenthetical is a lookbehind: in this case, FIGURE looks behind, meaning you find FIGURE only when it's preceded by "Note: Refer to", which is not matched itself. So bold italics would be applied only to FIGURE [-\d]+, and only when preceded by ...
    But you're not likely to have such fixed text. When you have just a few alternatives, you can list them as alternatives, so if you always have "Note: Refer to " or "NOTE: See " you could salvage your set-up, but with more than let's say three alternatives it gets messy.
    (?<=NOTE:.+? )FIGURE [-\d]+ , which you would hope would match any text from NOTE: to FIGURE, doesn't work as a lookbehind.
    Peter

  • Issue with GREP.  Need help to solve it pls...

    Hi,
    I have set a GREP as follow:
    Paragraph style: numbered + capital letters
    GREP:  \(.+?\) so that everything between () is written italic.
    When the list of ingredients is too long, I need to go to the next line (shift + enter).  Then it is like if the GREP gets broken...
    I have tried to put a \n but it doesn't work...
    Going crazy here
    Can anyone help?
    Thank you so m uch!

    Solution found...
    FYI here is the correct grep: \(.+\)

  • Creating a GREP style Help Needed

    I would like to set-up a style using GREP expression(s) that would do the following:
    Everything preceding an em dash (including the em dash and two spaces after the em dash) would be set to bold-italic, AND everything in the paragraph that begins with the word "NOTE:" until the end of the paragraph would be regular-italic.
    Here is a sample of the kind of text I want to format with one style:
    OPERATOR PANEL - The operator panel is located on the right-hand electrical enclosure. NOTE: Not all equipment will have the same operator panel. Refer to schematics for additional information.
    "OPERATOR PANEL - " would be all bold (or bold italic). The body text is regular. the "NOTE: Not all .... " to the end would be regular-italic.
    Any help or direction to a web-site with examples would be appreciated.
    Thanks in advance.
    RPP

    It's easier than you think.
    Peter's suggestion of a regular nesting style might work, except that it's
    i always
    applied to each paragraph you apply it to. That's just what the Grep styles are for:
    i conditional
    stuff.
    The 1st half: Apply Style: Bolded To Text: ^.*? ~=
    (there should be another space after the '=')
    The 2nd half: Apply Style: Italicized To Text: NOTE:.*$
    These are both pretty much basic GREP expressions -- except for the "~=", that's Adobe's --, so just about any google to a GREP repository can explain them. I already knew the basics, but
    this page taught me some new tricks.

  • Can somebody please help me creating a GREP style to reformat all the website adresses in my layout?

    i've got this text from a client full with webadresses, some end with .com or .nl and i would like to highlight these adressess in bold and blue... i created a textstyle for it but the only thing i manage to get as a result is only the beginning of the website 'www.' i know it's possible but my skills are lacking in this departement...
    can anyone help me getting started...?

    Got it.
    parentheses group #1 (the first | separated OR group): DOS path name, because a link can also refer to a file.
    parentheses groups #2-5 (2nd OR group): e-mail address. Note: a "mailto://" prefix does not get matched here.
    parentheses groups #6-13 (3rd OR group): URL, with a mandatory prefix "http://", "https://", "ftp://", and some more ("smb://", for example, is a Samba server file prefix). This also includes "ftps://", which was unknown to me but it appears it's perfectly valid.
    It does not match the "mailto://" prefix for an e-mail address, but that's a moot point because the URL may not contain a @ character anyway.
    This group correctly recognizes URLs that contain one or more hyphens in the base name (it also correctly rejects hyphens in the domain extension).
    parentheses groups #14-15: (4th and last OR group): any non-prefixed URL, recognized solely on the basis of "any sequence of word characters, including the hyphen, followed by a period, optionally followed by some more characters (including both period and forward slash but excluding the hyphen), followed by at least two uppercase or lowercase letters.
    This last one is responsible for (a) recognizing both "deadline.com" and "keefe-studios.com" as URLs, but (b) also rejecting "www.test-test.com" -- a hyphen in the 'center', fully optional, part.
    Interestingly, there are more differences between the more exact 'match only with prefix' and the catch-all 'match about anything'. The former includes among the allowed characters: ':' (which, if I recall correctly, is only valid if a port number follows!), '#', '$', '%', '&', '?' and '+', so it matches a server query as well:
    http://www.google.com/search?hl=enl&tbo=d&site=&source=hp&q=allowed+characters+in+url&oq=a llowed+characters+in+url
    The latter does not include all of these characters, just letters, numbers, the hyphen (but not in all positions), and a period. It's probably because this is an unreliable way to match URLs after all -- hence the number of 'false hits'. These would only increase with even more allowed characters.
    Lesson learned: to be assured "Create Hyperlinks Automatically" works as expected, make sure URLs are prefixed with "http://", and mail addresses are not prefixed with "mailto://". I didn't test if the function actually creates a correct e-mail link, but even if it does the prefix is not included in the clickable linked text.
    (Also interestingly, it appears a GREP style, fed with this same query, doesn't stumble over the hyphen whereas a GREP find does. I don't think I'm capable of figuring that one out.)

Maybe you are looking for

  • How to see Design View when using ?php require("header.htm"); ?

    Hello I'm new to DW CS4 and have what's probably a simple question, but I can't figure it out.  I have a basic html website in which I'm using php require to call  header.htm and footer.htm files.  In CS4, when I open any page in the Design or Split

  • IWeb not recognized

    Trying to launch iWeb08 gives this message: "You can't open the Application "iWeb" because it is not supported on this architecture." I noticed this around the time I tried to install the 10.5.2 update so it may be related but not sure. Had 10.5.2 pr

  • Failed to get DHCP response on interface "Marking interface dirty"

    Dears i have WLC 5508 showing the below Logs , which prevent the users from connecting to the SSIDs , also its disconnecting the associted users DHCP Socket Task: Jul 11 09:54:08.992: %SIM-3-DHCP_SERVER_NO_REPLY: sim_interface.c:1039 Failed to get DH

  • What AIR for android version should I choose to publish Flash game on Google play store ?

    My team and I are almost done whith our mobile game development using Flash professional CS6. We wonder what version of AIR for Android we should publish for as a target (in publish settings)??? because we will publish it on play store and we want it

  • IS Retail - Article Sales Price Updation in Article Master

    Hai guys, I created a new article (mm41) and I enetered Purchasing price in the 'Purchasing' tab. But when I give a mark up percentage in the 'Sales' tab, the price is not updating / changing as per the percentage. However I saw this feature working