USB keyboard only works intermittently in GRUB 2 on reboots - how to make it work consistently?

Something weird is going on with my keyboard. The keyboard is a USB-connected Unicomp, which works absolutely flawlessly once the computer is up and running. However, GRUB 2 (specifically, 1.99-27+deb7u1 as shipped in Debian Wheezy) isn't quite so happy. The failure modes make this a little difficult to test, but here's what I've been able to deduce thus far:   * The keyboard status LEDs flash during the POST, so the keyboard is detected (I also get a report "Detected: ... 1 Keyboard"); I've got maybe one "no keyboard detected" error from the POST, nowhere near enough to deduce any pattern to that, and I've been rebooting the system quite a few times in different ways lately   * On a power on from a full power off with the front panel power button, everything seems to work great   * On a reboot (either using `reboot` or `Control`+`Alt`+`Delete` in a booted system _or in GRUB_ ), the keyboard works in GRUB maybe every other time I try   * If I hit the Reset button on the computer to reboot, the keyboard consistently does not work in GRUB when the boot loader comes back, and many times does not react to key presses during the POST either What's even more weird is that I don't recall the computer acting like this before. I'm _hoping_ it's unrelated, but it seems to have started acting up right around when I hooked up the UPS to some more things around my desk, instead of only having hooked it up to the computer and monitor. (No, the UPS is nowhere near overloaded; the load is reported as being in the range 7-20% depending on usage; around 15-16% of maximum load when the computer is up and running normally.) I've Googled and found the suggestion to load the GRUB 2 modules `uhci` and `usb_keyboard`. I added a `GRUB_PRELOAD_MODULES` declaration specifying the two of them to /etc/default/grub and re-ran `update-grub` (there is now `insmod uhci` and `insmod usb_keyboard` in my /boot/grub/grub.cfg), but that does not seem to have changed anything. I've moved the keyboard to another USB port, which does not appear to have helped. I would try an offboard USB controller if I had one handy. BIOS/UEFI setup reports legacy USB support and legacy USB 3.0 support as enabled, and even if it didn't, I don't see why it would sometimes work and sometimes not, especially when many times the only difference between the two is which side of a warm reboot it's on. The motherboard is an ASUS M5A97 Pro with UEFI version `1007 02/10/2012`. I can't think of any other configuration changes I've done that coincide with when the computer started acting up. The logs _do_ mention an upgrade of `linux-image` on Aug 1, and that I reinstalled (it's noted as `upgrade`, but the from-version and to-version are identical) `grub-pc` on Aug 2, but both of those was a week before I even bought the UPS, and two weeks before I hooked it up to more than just the computer and monitor (I take care to not change too many things at once). `uname -r` reports `3.2.0-4-amd64`. I'm running out of ideas to try. **How can I get my USB keyboard to work consistently in GRUB 2?** What else can I check?


Why does diff fail when invoked from a Makefile?

Narrow-down of a patch problem I am trying to troubleshoot: Only two files, each with a size of 1 byte:   * file `a` (containing `'a'`)   * file `b` (containing `'b'`) and  Goal is to make and then apply a patch that will change the value of `'b'` to `'a'`. Contents of Makefile are:               patch:             diff -u b a > b2a.patch             patch -o b.corrected b < b2a.patch             diff a b.corrected          clean:             rm -f b2a.patch b.corrected      Given the above, `make` fails with the following output:               $ make     diff -u b a > b2a.patch     make: *** [patch] Error 1      If, however, I execute the commands in the Makefile one after the other on the bash shell, there is no problem at all.


generate gateway automatic through resolvconf & can't change my gateway

my connection is cable ethernate , UEFI mother board i7 intel processor, direct connect no routter, aliance broad band my root process:-               #ip link set eno1 up     #ip addr add (IP)/(netmask) dev eno1     #ip route add default via (gateway)               then it happend___     [root@103 suprokash]# ip route add default via 172.17.81.129     RTNETLINK answers: File exists     [root@103 suprokash]# ip mroute add default via 172.17.81.129     Command "add" is unknown, try "ip mroute help".     [root@103 suprokash]# ip route     default via 192.168.1.1 dev eno1  proto static      172.17.81.128/25 dev eno1  proto kernel  scope link  src 172.17.81.183      192.168.1.0/24 dev eno1  proto kernel  scope link  src 192.168.1.15  metric 1      [root@103 suprokash]# ip mroute     [root@103 suprokash]# ip -s route add default via 172.17.81.129     RTNETLINK answers: File exists      now what to do? how can i change my default route oh , my IP ping 100% done gateway ping 100% done               #ping 8.8.8.8     100% loss     #ping www.google.com      100% loss


Can a mounted encrypted filesystem be safe from root?

I have access to a shared remote computer from which I would like to run some code I have written which uses an interpreter (not a compiled code). I would like to protect this source code from other users who have root access to the remote machine. There are a variety of ways to make an encrypted folder in linux. I am not writing a lot of data to the disk so I am not worried about reduced I/O speed due to the encryption process, just mainly using many CPUs and a lot of RAM on this machine. My question is, do any of these encryption options allow the data to be protected from the root user, when I am logged in and have the filesystem mounted? A main concern is if a cron job running as root does a backup, then the source codes are automatically copied to another filesystem without even realizing it and then it is no longer encrypted.


Getting g++ to work on Mac with Xcode

In trying to get g++ to work in terminal I ran a command which I have now learned is outdated. I think this is why running g++ in terminal returns an error but I am unsure. If I try to run any .cpp in terminal I get the error message:               xcrun: Error: failed to exec real xcrun. (No such file or directory)      I have xcode installed and have installed command line tools. However after doing so, I ran the command below:               sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/      What have I done, and what should I do?


awk pairwise differences

I run into this problem a lot with data, if I have some integers, I frequently want to look at differences between adjacent integers, I usually solve this in Ruby or Python, but I think such a thing could be done in awk, and I'd prefer that. I have a table of data such as:               201309,694     201310,699     201311,700     201312,705     201401,713     201402,740      And I would like to find the adjacent differences, that is:               201310-201309,699-694     201311-201310,700-699     201312-201311,705-700     201401-201312,713-715     201402-201401,740-713      I found the function `getline` in the awk manpage, but I haven't been able to use it successfully.


How can I switch scim’s IMEs via command line?

I have a bunch of SCIM IMEs installed. I switch between them via hot-key. Is there a way to switch between them programmatically? Can I even switch SCIM on and off via command line? I use `Ctrl`+`Space` to do that at the moment...


Linux: how to get all login logs from my system

I want to know all the times a user logs since last year into my system?   I used `last` command but it is not useful.


rpcbind-"warning" on boot

On my debian testing system, I get these messages in my `/var/log/boot` file:               Starting rpcbind daemon...rpcbind:     Cannot open '/var/run/rpcbind/rpcbind.xdr' file for reading, errno 2 (No such file or directory)       rpcbind: Cannot open '/var/run/rpcbind/portmap.xdr' file for reading, errno 2 (No such file or directory)      Thus it is coming up - but with this annoying message. I do not know how to remove this.


Automate Ubuntu Provisioning

Could anyone point me the best application used to provision Ubuntu (Unattended installation)? If possible point me some nice tutorials.


/bypass folder on ArchBang - safe to delete?

Anyone know what is this folder for, and if it's safe to delete it? It's an ArchBang box, and this folder was there ever since install. I'm not really sure if it's just some junk left after installation, or if it genuinely has some purpose? (edit: it's empty) ![enter image description here](http://i.stack.imgur.com/CjCuc.png)


Simplest way of getting a bootable linux flash drive + VM in Windows

I realize tools for making a flash drive image that boots a linux system (for example ubuntu) are common enough. I'd like to get a flash drive like that that also lets me use the system inside of Windows, without administrator privileges. I don't know if that's even technically possible... In other words, if I hop onto a public computer running Windows and insert my flash drive, I want to jump into my linux system without rebooting the computer, and without administrator privileges in Windows. Is that technically possible? If so are there tools (distro-specific tools are ok) that will make me such a flash drive?


How to read over 4k input without new lines on a terminal?

So I have a lot of data **WITHOUT NEW LINES** on the clipboard (it's a large SVG file on one line). I went               $ cat >file.svg      then tried to paste (in Gnome Terminal), but only the first 4kB characters were accepted. I assume this is a readline feature/limitation. Is there a way to read from STDIN that would avoid this problem? ## EDIT Test case: Create a demo file. This one will have ~4k "=" symbols followed by "foo bar".               { printf '=%.0s' {1..4095} ; echo "foo bar" ; } > test.in      Copy that into your clipboard               xclip test.in      (if you want to middle-click to insert) or               xclip -selection clipboard test.in      (if you want to use Ctrl-Shift-Insert to past it in) Then `cat >test.out`, paste (whichever way). Press Ctrl-D to end the stream. `cat test.out` \- do you see "foo bar"? On my set-up (Ubuntu 12.04, Gnome Terminal, zsh) when I paste I only see the `=` and I don't see `foo bar`. Same when I inspect `test.out`.


Is there an easy way to background a sudo shell?

A bit more details, what I'm looking for is some kind of `^Z` for `sudo` shells. For instance when running a long command I can hit `^Z` to suspend the command or when I do `~^Z` in `ssh` after hitting `Enter`. Then I can simply do `fg` and get my long command/`ssh` session running again.


Are All The Packages Included On The Debian DVD/CD Images Or Just The Most Popular?

My understanding is that Debian and all the software available in the matching online repo (eg: https://packages.debian.org/stable/allpackages) are released together on a series of disc images (alternatively you can just download the first disc and use apt-get to download individual packages), however when I look in http://cdimage.debian.org/debian-cd/7.4.0/amd64/iso-dvd/ there are only 3 dvd images which seems a little on the small side for thousands of applications. Is the entire repo on those discs, or just the most popular applications? I have already looked at the section on cds here: www.debian.org/CD/faq/#which-cd and it simply talks about how the discs arranged with the the most popular applications first, but doesn't say if all applications are included. EDIT: I've been browsing some of the http/ftp mirrors and most of them have 3 iso, but I found some that have more. This one has 10: ftp://debian.mirror.iweb.ca/debian-cd/7.4.0/amd64/iso-dvd/ How many isos is there in total?


Upstart on Debian?

I created an upstart script in Ubuntu, thinking it would be the same for Debian. But Debian doesn't have a `/etc/init` folder that Ubuntu has. I went to the upstart download page and seeing that they have packages, did a `apt- get install upstart`, but it asks to remove sysvinit, which I know will/might screw up my system. So how do I make my Ubuntu script work on Debian?


How to export/extract audio from a DVD under Fedora 14?

i have a DVD's content on my HDD: i have these 2 usually folders, ok:      AUDIO_TS   VIDEO_TS      I just can't google a working way to extract the audio from the DVD. the howtos usually write about when the dvd is in the ODD. but i have it on my HDD, and don't want to burn it to a dvd (there are several dvd's exactly).   Are there any good way to extract the audio part from the DVD?      my original problem is that i want to convert them to h263 "AVI". But theres no sound when i open them with avidemux. but: i can import sound files to avidemux, if i had them.


Gnome desktop environment stopped working in kali linux(debian based)

Gnome desktop environment stopped working after change in `libudev.so.0` in `/lib/x86_64-linux-gnu/` and showing error:               cannot open shared libraries      I am trying too hard to get rid of this problem but unable to solve. I have 64 bit kali debian based linux(~).Now I donot have any files realted to `libudev.so.*` in `/lib/x86_64-linux-gnu/`. From this my gdm is also not working.


Find and close/unlink message queues in the system

I have a SLES-11 machine on which I am not the root where I am building software code that makes extensive use of message queues. Due to some bugs, Now have an error: `mq_open: Too many open files` I am using the command `ipcs -a` but I do not see my message queues. So I can't use `ipcrm` command. So, right now I cannot use the machine at all. Is there a way to find message queues (opened by me) in the system and close them ? Info: I do not have a `/dev/mqueue` in my system. I am also not the `root` user


Accessing GPIO after kernel boots

my rootfs.cpio has only following files:               [root@localhost extract]# ls      dev  init  tmp      dev has console only. init is cross-compiled from the program given at the end: Then I make a my image and run linux. It runs fine but when init comes it shows error similar to the following :               Failed to open /sys/class/gpio/gpio251/direction       Failed to open /sys/class/gpio/gpio251/value      So, I manually created these folders and files and now it looks like this:               [root@localhost extract]# ls          dev  init  tmp sys      inside sys I created required folders and files(empty). But even then code is not executing and kernel panics. **Background** This code I took from a complete file system, which had all the directories expected in a linux system. I took this code cross compiled separately, and renamed it to init. And expecting to work(Light an LED eg). **Another approach**               bash> echo 240 > /sys/class/gpio/export     bash> echo out > /sys/class/gpio/gpio240/direction     bash> echo 1 > /sys/class/gpio/gpio240/value      This approach is described GPIO DRIVER. So after manually creating these required files and I cross-compiled it and renamed it to init. And then made rootfs.cpio and created my OS image. But this also did not work. **Questions** Why is the code not executing properly in my own file system (partial)? Does the code depends upon some other files or dynamic libraries (which are present in complete file system)? Why is my manually created files not working?                   #include <stdio.h>         #include <stdlib.h>         #include <unistd.h>         #include <string.h>         #include <errno.h>         #include <fcntl.h>         #include <signal.h>         int main( )         {             extern char *optarg;             char *cptr;             int gpio_value = 0;             int nchannel = 0;                  int c;             int i;                  opterr = 0;          int argc=5;     char *argv;     char *argv2[] = {"gpio-demo", "-g", "255", "o", "0"}; argv = argv2;              while ((c = getopt(argc, argv, "g:io:ck")) != -1) {                 switch (c) {                     case 'g':                         gl_gpio_base = (int)strtoul(optarg, &cptr, 0);                         if (cptr == optarg)                             usage(argv[0]);                         break;                     case 'i':                         gpio_opt = IN;                         break;                     case 'o':                         gpio_opt = OUT;                         gpio_value = (int)strtoul(optarg, &cptr, 0);                         if (cptr == optarg)                             usage(argv[0]);                         break;                     case 'c':                         gpio_opt = CYLON;                         break;                     case 'k':                         gpio_opt = KIT;                         break;                     case '?':                         usage(argv[0]);                     default:                         usage(argv[0]);                      }             }                  if (gl_gpio_base == 0) {                 usage(argv[0]);             }                  nchannel = open_gpio_channel(gl_gpio_base);             signal(SIGTERM, signal_handler); /* catch kill signal */             signal(SIGHUP, signal_handler); /* catch hang up signal */             signal(SIGQUIT, signal_handler); /* catch quit signal */             signal(SIGINT, signal_handler); /* catch a CTRL-c signal */             switch (gpio_opt) {                 case IN:                     set_gpio_direction(gl_gpio_base, nchannel, "in");                     gpio_value=get_gpio_value(gl_gpio_base, nchannel);                     fprintf(stdout,"0x%08X\n", gpio_value);                     break;                 case OUT:                     set_gpio_direction(gl_gpio_base, nchannel, "out");                     set_gpio_value(gl_gpio_base, nchannel, gpio_value);                     break;                 case CYLON:         #define CYLON_DELAY_USECS (10000)                     set_gpio_direction(gl_gpio_base, nchannel, "out");                     for (;;) {                         for(i=0; i < ARRAY_SIZE(cylon); i++) {                             gpio_value=(int)cylon[i];                             set_gpio_value(gl_gpio_base, nchannel, gpio_value);                         }                         usleep(CYLON_DELAY_USECS);                     }                 case KIT:         #define KIT_DELAY_USECS (10000)                     set_gpio_direction(gl_gpio_base, nchannel, "out");                     for (;;) {                         for (i=0; i<ARRAY_SIZE(kit); i++) {                             gpio_value=(int)kit[i];                             set_gpio_value(gl_gpio_base, nchannel, gpio_value);                         }                         usleep(KIT_DELAY_USECS);                     }                 default:                     break;             }             close_gpio_channel(gl_gpio_base);             return 0;         }


No result when using Multiple write file & sed in shell script

I would like to swap variables from old file to new file when I use single line like this               cat ../oldFile.html | sed "s@$dayMaxInNew@$dayMaxIn@g" > newFile      There's result from newFile. But When I use more than 2 line as follows:               cat ../oldFile.html | sed "s@$dayMaxInNew@$dayMaxIn@g" > newFile          cat newFile | sed "s@$dayAvgInNew@$dayAvgIn@g" > newFile          cat newFile | sed "s@$dayCurInNew@$dayCurIn@g" >  newFile      no result from newFile. I try to use sleep but It doesn't Work. PS. The 2nd and 3rd line I swap variable in samefile. any advice?


configuration to listen-on different depending on the domain asked

I want to configure bind such that the host served differ depending on the domain asked. the use case is the following: it must respond to anyone if the requested domain is in the domain my server is authoritative for, and must accept to respond to a limited range of IP addresses otherwise. (I don't want a open recursive resolver) I think this should be possible through the ''listen-for'' directive, but i'm unsure.


grub error no such partition

I have an HP laptop with 5 partitions. I installed windows 7 on the first one, Ubuntu on the second and Kali on the third and left the other two for general use. Before, when I booted my laptop, I was preseneted with GRUB which asked me to select an OS. Now, when I wanted to remove kali by deleting the same partition in which it was installed, it failed. But now when I boot or start my laptop it says               WELCOME TO GRUB     error:no such partition     Entering rescue mode     grub rescue...


Fedora Rawhide - 8330 GPU Driver install?

So I have got a new laptop with an AMD A4 5000 APU with the integrated GPU running a 8330 GPU, I know that fedora has problems with AMD, so I have a few questions to ask.   1. RadeonSI on 8330, Is this supported via the SI driver? If so how do I enable RadeonSI as default driver, and what's its power draw like?   2. If not, how can I install AMD Catalyst on Rawhide so it does not crash the system and also I can keep updating without any issues?


Command-line completion from command history

So, I've looked at history and at `Ctrl`+`R`, but they are not what I thought I knew. Is there a way that I can type in the beginning of a command, and cycle through the matches in my history with some bash shortcut?               # mysq(some shortcut key)      Gives me:               # mysqldump  --add-drop-table -e -q -n -C -u      (some shortcut key)     #  mysql -u ben.dauphinee -p


What is the purpose of UUIDs for NICs?

On Fedora/RHEL/CentOS there is a line in `/etc/sysconfig/network- scripts/ifcfg-x` files which defines `UUID`:               UUID=30fcd648-ad1e-4428-as6f-951e8e4d16df      NICs have MAC addresses by them selves, so what is the purpose of pointing UUIDs to NICs when there is already an identification number (MAC) and also unlike file systems UUIDs they can't be stored on device itself?


add server name before filename with uname -n

Here is my command in my script:               mv -f -v $oldfile /infanass/dev/admin/backup/${oldfile##*/}_$(date +%F-%T)      Right now the output is:               file1.txt_2013-07-11-15:08:16       I want the server name to show up before the file name. I think :               uname -n       is the right command but i just can't get it to show up.


Logitech MX-510: Some extra buttons not usable

I have a Logitech MX-510, that I've been using for about six years. ![Logitech MX-510](http://i.stack.imgur.com/QERCw.jpg) The Mouse has several extra buttons, that I'd like to use in Gnome, but I have problems with the button codes, that the mouse sends to the driver:   * Button 1 (mouse wheel button) works as expected. One `ButtonPress` event with `state 0x10` and `button 1` on press, and `ButtonRelease` with `state 0x110`on release.   * Button 2 (mouse wheel button) works as expected. One `ButtonPress` event with `state 0x10` and `button 2` on press, and `ButtonRelease` with `state 0x210`on release.   * Button 3 (right button) works as expected. One `ButtonPress` event with `state 0x10` and `button 3` on press, and `ButtonRelease` with `state 0x410`on release.   * Button 4 (scroll up) works as expected. It sends a `ButtonPress` event with `state 0x10` and `button 4`, and a `ButtonRelease` event with `state 0x810`. Both events occur instantaneous on each scroll step.   * Button 5 (scroll down) works as expected. It sends a `ButtonPress` event with `state 0x10` and `button 5`, and a `ButtonRelease` event with `state 0x1010`. Both events occur instantaneous on each scroll step. _Buttons 6 and 7 seem to not exist._   * Button 8 (back button) works as expected. It sends a `ButtonPress` event with `state 0x10` and `button 8`, and a `ButtonRelease` event also with `state 0x10`. Both events occur instantaneous on each scroll step.   * Button 9 (back button) works as expected. It sends a `ButtonPress` event with `state 0x10` and `button 9`, and a `ButtonRelease` event also with `state 0x10`. Both events occur instantaneous on each scroll step. The mouse has three additional buttons, as you can see in the picture above.   * Button 10 (on the very top of the mouse) is not usable. It sends a `ButtonPress` event with `state 0x10` and `button 10`, and a `ButtonRelease` event also with `state 0x10`. The button is not usable with Gnome, because it is not selectable. Most option selectors, like that one of CompizConfig Settings Manager just goes up to Button 9.   * Button 11 (extra button to the front of the mouse wheel) is not quite usable. When pressed, it sends a `ButtonPress` event with `state 0x10` and `button 11`, **and** another `ButtonPress` event with `state 0x10` and `button 4` **and** yet another one `ButtonPress` event with `state 0x810` and `button 4` (the last two being the same behaviour as if the scroll wheel was moved one step up). On release it sends a `ButtonRelease` event with `state 0x10` and `button 11`. But the catch is, when the button is held down, it repeats the "mouse wheel simulation" about five times per second. (like a mousewheel cruise-control or something).   * Button 12 (extra button to the back of the mouse wheel) is not quite usable. When pressed, it sends a `ButtonPress` event with `state 0x10` and `button 12`, **and** another `ButtonPress` event with `state 0x10` and `button 5` **and** yet another one `ButtonPress` event with `state 0x1010` and `button 5` (the last two being the same behaviour as if the scroll wheel was moved one step up). On release it sends a `ButtonRelease` event with `state 0x10` and `button 12`. When held down it displays the same cruise-control behavior as button 11, but with the respective button and state parameters. Is there a way how I can remap those additional keys in a way, where I can use them or make them usable with Gnome? And especially, if it is possible, to make buttons 11 and 12 stop sending codes for mouse wheel scroll up and down. And if possible, how can I change the general behavior of the mouse buttons in general?


Redis: Error writing to client: Broken pipe

I would like to use Redis for Magento LestiFPC. Magento/Redis is using Pecl php-redis. I assigned 8 DB's to use over 2 Magento websites. Unfortunately there are only 5 DB's are in use (max 16 redis.conf). There is also an error which I don't understand: Error writing to client: Broken pipe How to solve this?


What does the -e do in a bash shebang?

I have a bash script with the following:               #!/bin/bash -e          egrep "^username" /etc/passwd >/dev/null      if[ $? -eq 0 ]      then        echo "doesn't exist"      fi      This script will not run without the -e. What does the `-e` do for this script? Also, what does the `$?` do in this context?


Mount entry in fstab when connect to a network

I have an entry in fstab (Opensuse) which mounts a samba filesystem:               //10.39.52.2/Company /media/share cifs credentials=/home/user/file,rw,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777 0 0      but this mount always fails on startup since connection to network happens at a later moment. How can I **write a rule** that, each time I connect to a network — the ESSID could be the trigger for wifi, what about cable? — tries to `mount` `/media/share`?


How to get the JSON STRING from the given string

I have a string given below. I just need to get the first **accountHeader** (bolded) JSON string, I tried everything.. It didn't work. Can you help me to get the data?               <START AdditionalInfo#:>[FormsGenerationServiceImpl::,  accountNumber:ABC07667 ,  [Source System Request  : {"Info":{"Holder": {"nameData": {"shortName": "McIntosh"}},**"accountHeader": {"a": "Y","b": "1","c": "4","draft": "P","e": "Y0000DU9","f": "T","g": "1"}**,"forms": {"maskSSN": "N","deliverForms": "G","selectedForms": {"T5": ["F10"],"T1": ["F1403"],"T2": ["F100001401"]}},"accountHeader": {"a": "Y","b": "1","c": "4","d": "HWA","draftRequestType": "P","e": "Y0000DU9","f": "T","g": "1"}}} ], null]<AdditionalInfo#: END>      My output should be               "accountHeader": {"a": "Y","b": "1","c": "4","draft": "P","e": "Y0000DU9","f": "T","g": "1"}


IPtables : Limit number of new ssh connections per minute

I need to ensure on my server that maximum new ssh connections per minute are not more then 5.               sudo /sbin/iptables -A INPUT -p tcp --syn --dport 22 -m connlimit --connlimit-above 5 -j REJECT      Above IPtables rule work for me, but it will not allow new connections after one minute. Any pointers how to achieve this?


Why does bash add single quotes to unquoted failed pathname expansions in a command before executing it?

I was exploring the tracing of commands using `set -x` (`set +x` to unset) in `bash`: > Print a trace of simple commands, for commands, case commands, select > commands, and arithmetic for commands and their arguments or associated word > lists after they are expanded and before they are executed. The value of the > PS4 variable is expanded and the resultant value is printed before the > command and its expanded arguments. Now consider the following, tracing the use of the the bash builtin `echo \\[-neE\\] \\[arg …\\]` command with and _without_ quotes:               # set -x        # what I typed     # echo 'love'   # ...     + echo love     <--(1) the trace     love            # the output          # echo love?    # note the input contains no quote whatsoever     + echo 'love?'  <--(2) note the trace contains quotes after returning word     love?           # i.e. failed to find any file           # echo 'love?'  # note the input contains single quotes     + echo 'love?'  <--(3) traces like (2)     love?          # touch loveu   # we create a file that matches the love? pattern     + touch loveu          # echo love?    # of course now, the pattern matches the created file now     + echo loveu    <--(4) indeed it finds it and expands to name     loveu           # the name is echoed      So `?` is indeed interpreted in this case as a special character used for _pattern matching_ one single character in _pathname expansion_. Sure enough, once a file matching the pattern was created in the current directory, the match occurred and the name of the file was printed. Of course this behavior is documented: > If no matching file names are found, and the shell option nullglob is > disabled, the word is left unchanged. But the thing is that the word in (2) is unquoted `love?` not `'love?'`. The trace shows the state before command execution but _after_ expansion, and as we're seeing there is pathname expansion because of `?` and there were no matches in the first case(2) we used the special character. So the single quotes appear in that case, just as when we use single quotes(3) ourselves with the same string? Whereas in the other cases there was either a literal or the match was found and accordingly "replaced" the pattern in the command. This seems to be what is meant in the manual section on quote removal right after expansion: > After the preceding expansions, all unquoted occurrences of the characters > ‘\’, ‘'’, and ‘"’ that _did not result_ from one of the above expansions are > removed. (my italics) So here(2) we have unquoted occurrences of `'` which result from the prior expansion. I did not put them there; bash did, and now they're _not removed_ - and we're just before the execution of the command. * * * _Similar illustration with`for`_ Consider this list used in a `for name [ [in [words …] ] ; ] do commands; done` loop1 , with no matching file:               # for i in love love? 'love?'; do echo $i; done     + for i in love 'love?' ''\''love?'\'''     + echo love     love     + for i in love 'love?' ''\''love?'\'''     + echo 'love?'     love?     + for i in love 'love?' ''\''love?'\'''     + echo 'love?'     love?      So the `echo` command behavior is quite the same but in the case of the items in the `for` construct, it seems like it's trying to... escape itself quoting my quotes?? I'm uncertain... * * * **Questions**   * Why is an unquoted failed pathname expansion pattern denoted with `single quotes` in the context(2); expansion is completed anyway and we're going to execute? Again, we've completed expansion already and the pattern failed - nothing should have to expand anymore. I guess what I'm asking is why do we care at this point - the point we're at is just before 3.7.2-4 in the bash manual. Why isn't this left "as is" and expansion is simply turned off for command execution i.e. something like `set -f`?   * (What is the `for` loop doing with my single quoted item in the list?) * * * 1. When using such a word list construct with for, it's really a list of items and the values are for convenience really as I find `t="0"; for i in 0 0 0 0; do let t++; echo "yes, this is really $t times"; done` quite convincing.


Loop over a file and read values from two columns into variables

I have a file (`data.dat`) which contains 3 columns. I want to read in two of them with the shell script and fill the contents into a template file. The file looks like this:               12 180 2390     14 177 2210     16 173 2130     ...      So far I can do that with one variable (which is column 2 in the data-file) as follows:               for a in `cat data.dat | gawk '{print $2}'`; do      sed s/A/$a/ daily.template daily.template > daily.inp     done      Now I want to read in column 3 as well and give the according value (b) of the same line as column 2 to the same template. The template contains variables called "A" and "B". I cannot do a nested for loop as I don't want to iterate each value of a over each value of b. How can I achieve this? **Addition:** First of all thanks for all your help! Yes, it might be more easy to understand if I give more information about the daily.template file. It is looking similiar to:               dens_column O3 300.00     dens_column h20 B     sza A     day_of_year 172     output sum     ...      A and B should be replaced in every loop over the lines. The first column in data.dat does not mean anything, it just displays the time of a measurement and this parameter is not needed in "daily.inp". I just want one "daily.inp" for each line where A and B are replaced with the according value of column 2 and 3 in the according line. So a daily.inp file like:               dens_column O3 300.00     dens_column h20 2390     sza 180     day_of_year 172     output sum     ...      Then the next file separate:               dens_column O3 300.00     dens_column h20 2210     sza 177     day_of_year 172     output sum     ...      And so on...


G722 in gstreamer is not available or its need to be activated? How do i do that?

Gstreamer how to use G.722 enc and dec? Is this not available or missing in there implementation?               $ gst-inspect | grep ffmpeg     ffmpeg:  ffaudioresample: FFMPEG Audio resampling element     ffmpeg:  ffdeinterlace: FFMPEG Deinterlace element     ffmpeg:  ffmux_yuv4mpegpipe: FFmpeg YUV4MPEG pipe format muxer (not recommended, use y4menc instead)     ffmpeg:  ffmux_webm: FFmpeg WebM file format muxer (not recommended, use webmmux instead)     ffmpeg:  ffmux_wav: FFmpeg WAV format muxer (not recommended, use wavenc instead)     ffmpeg:  ffmux_voc: FFmpeg Creative Voice file format muxer     ffmpeg:  ffmux_rcv: FFmpeg VC-1 test bitstream muxer     ffmpeg:  ffmux_3gp: FFmpeg 3GP format muxer (not recommended, use gppmux instead)     ffmpeg:  ffmux_3g2: FFmpeg 3GP2 format muxer     ffmpeg:  ffmux_swf: FFmpeg Flash format muxer     ffmpeg:  ffmux_spdif: FFmpeg IEC958 - S/PDIF (IEC-61937) muxer     ffmpeg:  ffmux_sox: FFmpeg SoX native format muxer     ffmpeg:  ffmux_rtsp: FFmpeg RTSP output format muxer     ffmpeg:  ffmux_rm: FFmpeg RealMedia format muxer     ffmpeg:  ffmux_psp: FFmpeg PSP MP4 format muxer     ffmpeg:  ffmux_ogg: FFmpeg Ogg muxer (not recommended, use oggmux instead)     ffmpeg:  ffmux_nut: FFmpeg NUT format muxer     ffmpeg:  ffmux_mxf_d10: FFmpeg Material eXchange Format, D-10 Mapping muxer     ffmpeg:  ffmux_mxf: FFmpeg Material eXchange Format muxer (not recommended, use mxfmux instead)     ffmpeg:  ffmux_mpjpeg: FFmpeg MIME multipart JPEG format muxer (not recommended, use multipartmux instead)     ffmpeg:  ffmux_mpegts: FFmpeg MPEG-2 transport stream format muxer (not recommended, use mpegtsmux instead)     ffmpeg:  ffmux_vob: FFmpeg MPEG-2 PS format (VOB) muxer     ffmpeg:  ffmux_svcd: FFmpeg MPEG-2 PS format (VOB) muxer     ffmpeg:  ffmux_dvd: FFmpeg MPEG-2 PS format (DVD VOB) muxer     ffmpeg:  ffmux_vcd: FFmpeg MPEG-1 System format (VCD) muxer     ffmpeg:  ffmux_mpeg: FFmpeg MPEG-1 System format muxer     ffmpeg:  ffmux_mp4: FFmpeg MP4 format muxer (not recommended, use mp4mux instead)     ffmpeg:  ffmux_mp3: FFmpeg MPEG audio layer 3 formatter (not recommended, use id3v2mux instead)     ffmpeg:  ffmux_mp2: FFmpeg MPEG audio layer 2 formatter (not recommended, use id3v2mux instead)     ffmpeg:  ffmux_mov: FFmpeg MOV format muxer (not recommended, use qtmux instead)     ffmpeg:  ffmux_mmf: FFmpeg Yamaha SMAF muxer     ffmpeg:  ffmux_matroska: FFmpeg Matroska file format muxer (not recommended, use matroskamux instead)     ffmpeg:  ffmux_ipod: FFmpeg iPod H.264 MP4 format muxer     ffmpeg:  ffmux_gxf: FFmpeg GXF format muxer     ffmpeg:  ffmux_flv: FFmpeg FLV format muxer (not recommended, use flvmux instead)     ffmpeg:  ffmux_filmstrip: FFmpeg Adobe Filmstrip muxer     ffmpeg:  ffmux_ffm: FFmpeg FFM (FFserver live feed) format muxer     ffmpeg:  ffmux_dv: FFmpeg DV video format muxer     ffmpeg:  ffmux_daud: FFmpeg D-Cinema audio format muxer     ffmpeg:  ffmux_avm2: FFmpeg Flash 9 (AVM2) format muxer     ffmpeg:  ffmux_avi: FFmpeg AVI format muxer (not recommended, use avimux instead)     ffmpeg:  ffmux_au: FFmpeg SUN AU format muxer     ffmpeg:  ffmux_asf_stream: FFmpeg ASF format muxer (not recommended, use asfmux instead)     ffmpeg:  ffmux_asf: FFmpeg ASF format muxer (not recommended, use asfmux instead)     ffmpeg:  ffmux_amr: FFmpeg 3GPP AMR file format muxer     ffmpeg:  ffmux_aiff: FFmpeg Audio IFF muxer (not recommended, use aiffmux instead)     ffmpeg:  ffmux_adts: FFmpeg ADTS AAC muxer (not recommended, use aacparse instead)     ffmpeg: fftype_yuv4mpegpipe: y4m     ffmpeg:  ffdemux_yuv4mpegpipe: FFmpeg YUV4MPEG pipe format demuxer     ffmpeg: fftype_yop: yop     ffmpeg:  ffdemux_yop: FFmpeg Psygnosis YOP Format demuxer     ffmpeg: fftype_xa: no extensions     ffmpeg:  ffdemux_xa: FFmpeg Maxis XA File Format demuxer     ffmpeg: fftype_wsvqa: no extensions     ffmpeg:  ffdemux_wsvqa: FFmpeg Westwood Studios VQA format demuxer     ffmpeg: fftype_wsaud: no extensions     ffmpeg:  ffdemux_wsaud: FFmpeg Westwood Studios audio format demuxer     ffmpeg: fftype_wc3movie: no extensions     ffmpeg:  ffdemux_wc3movie: FFmpeg Wing Commander III movie format demuxer     ffmpeg:  ffdemux_wav: FFmpeg WAV format demuxer     ffmpeg: fftype_w64: no extensions     ffmpeg:  ffdemux_w64: FFmpeg Sony Wave64 format demuxer     ffmpeg: fftype_vqf: vqf     ffmpeg:  ffdemux_vqf: FFmpeg Nippon Telegraph and Telephone Corporation (NTT) TwinVQ demuxer     ffmpeg:  ffdemux_voc: FFmpeg Creative Voice file format demuxer     ffmpeg: fftype_vmd: no extensions     ffmpeg:  ffdemux_vmd: FFmpeg Sierra VMD format demuxer     ffmpeg:  ffdemux_vc1test: FFmpeg VC-1 test bitstream format demuxer     ffmpeg: fftype_txd: no extensions     ffmpeg:  ffdemux_txd: FFmpeg Renderware TeXture Dictionary demuxer     ffmpeg:  ffdemux_tta: FFmpeg True Audio demuxer     ffmpeg: fftype_tmv: no extensions     ffmpeg:  ffdemux_tmv: FFmpeg 8088flex TMV demuxer     ffmpeg: fftype_tiertexseq: no extensions     ffmpeg:  ffdemux_tiertexseq: FFmpeg Tiertex Limited SEQ format demuxer     ffmpeg: fftype_thp: no extensions     ffmpeg:  ffdemux_thp: FFmpeg THP demuxer     ffmpeg:  ffdemux_swf: FFmpeg Flash format demuxer     ffmpeg: fftype_psxstr: no extensions     ffmpeg:  ffdemux_psxstr: FFmpeg Sony Playstation STR format demuxer     ffmpeg: fftype_sox: no extensions     ffmpeg:  ffdemux_sox: FFmpeg SoX native format demuxer     ffmpeg: fftype_sol: no extensions     ffmpeg:  ffdemux_sol: FFmpeg Sierra SOL format demuxer     ffmpeg: fftype_smk: no extensions     ffmpeg:  ffdemux_smk: FFmpeg Smacker video demuxer     ffmpeg: fftype_siff: vb,son     ffmpeg:  ffdemux_siff: FFmpeg Beam Software SIFF demuxer     ffmpeg: fftype_film_cpk: no extensions     ffmpeg:  ffdemux_film_cpk: FFmpeg Sega FILM/CPK format demuxer     ffmpeg: fftype_rpl: no extensions     ffmpeg:  ffdemux_rpl: FFmpeg RPL/ARMovie format demuxer     ffmpeg: fftype_RoQ: no extensions     ffmpeg:  ffdemux_RoQ: FFmpeg id RoQ format demuxer     ffmpeg:  ffdemux_rm: FFmpeg RealMedia format demuxer     ffmpeg: fftype_rl2: no extensions     ffmpeg:  ffdemux_rl2: FFmpeg RL2 format demuxer     ffmpeg: fftype_r3d: no extensions     ffmpeg:  ffdemux_r3d: FFmpeg REDCODE R3D format demuxer     ffmpeg: fftype_qcp: no extensions     ffmpeg:  ffdemux_qcp: FFmpeg QCP format demuxer     ffmpeg: fftype_pva: no extensions     ffmpeg:  ffdemux_pva: FFmpeg TechnoTrend PVA file and stream format demuxer     ffmpeg: fftype_oma: oma,aa3     ffmpeg:  ffdemux_oma: FFmpeg Sony OpenMG audio demuxer     ffmpeg:  ffdemux_ogg: FFmpeg Ogg demuxer     ffmpeg:  ffdemux_nuv: FFmpeg NuppelVideo format demuxer     ffmpeg: fftype_nut: nut     ffmpeg:  ffdemux_nut: FFmpeg NUT format demuxer     ffmpeg: fftype_nsv: no extensions     ffmpeg:  ffdemux_nsv: FFmpeg Nullsoft Streaming Video demuxer     ffmpeg: fftype_nc: v     ffmpeg:  ffdemux_nc: FFmpeg NC camera feed format demuxer     ffmpeg:  ffdemux_mxf: FFmpeg Material eXchange Format demuxer     ffmpeg: fftype_mvi: mvi     ffmpeg:  ffdemux_mvi: FFmpeg Motion Pixels MVI format demuxer     ffmpeg: fftype_MTV: no extensions     ffmpeg:  ffdemux_MTV: FFmpeg MTV format demuxer     ffmpeg: fftype_msnwctcp: no extensions     ffmpeg:  ffdemux_msnwctcp: FFmpeg MSN TCP Webcam stream demuxer     ffmpeg:  ffdemux_mpegtsraw: FFmpeg MPEG-2 raw transport stream format demuxer     ffmpeg:  ffdemux_mpegts: FFmpeg MPEG-2 transport stream format demuxer     ffmpeg:  ffdemux_mpeg: FFmpeg MPEG-PS format demuxer     ffmpeg:  ffdemux_mpc8: FFmpeg Musepack SV8 demuxer     ffmpeg:  ffdemux_mpc: FFmpeg Musepack demuxer     ffmpeg:  ffdemux_mp3: FFmpeg MPEG audio layer 2/3 demuxer     ffmpeg:  ffdemux_mov_mp4_m4a_3gp_3g2_mj2: FFmpeg QuickTime/MPEG-4/Motion JPEG 2000 format demuxer     ffmpeg: fftype_mmf: no extensions     ffmpeg:  ffdemux_mmf: FFmpeg Yamaha SMAF demuxer     ffmpeg: fftype_mm: no extensions     ffmpeg:  ffdemux_mm: FFmpeg American Laser Games MM format demuxer     ffmpeg:  ffdemux_matroska: FFmpeg Matroska file format demuxer     ffmpeg: fftype_lmlm4: no extensions     ffmpeg:  ffdemux_lmlm4: FFmpeg lmlm4 raw format demuxer     ffmpeg: fftype_iv8: no extensions     ffmpeg:  ffdemux_iv8: FFmpeg A format generated by IndigoVision 8000 video server demuxer     ffmpeg: fftype_ISS: no extensions     ffmpeg:  ffdemux_ISS: FFmpeg Funcom ISS format demuxer     ffmpeg: fftype_ipmovie: no extensions     ffmpeg:  ffdemux_ipmovie: FFmpeg Interplay MVE format demuxer     ffmpeg: fftype_IFF: no extensions     ffmpeg:  ffdemux_IFF: FFmpeg IFF format demuxer     ffmpeg: fftype_idcin: no extensions     ffmpeg:  ffdemux_idcin: FFmpeg id Cinematic format demuxer     ffmpeg: fftype_gxf: no extensions     ffmpeg:  ffdemux_gxf: FFmpeg GXF format demuxer     ffmpeg: fftype_4xm: no extensions     ffmpeg:  ffdemux_4xm: FFmpeg 4X Technologies format demuxer     ffmpeg:  ffdemux_flv: FFmpeg FLV format demuxer     ffmpeg: fftype_flic: no extensions     ffmpeg:  ffdemux_flic: FFmpeg FLI/FLC/FLX animation format demuxer     ffmpeg: fftype_filmstrip: flm     ffmpeg:  ffdemux_filmstrip: FFmpeg Adobe Filmstrip demuxer     ffmpeg: fftype_ffm: no extensions     ffmpeg:  ffdemux_ffm: FFmpeg FFM (FFserver live feed) format demuxer     ffmpeg: fftype_ea_cdata: cdata     ffmpeg:  ffdemux_ea_cdata: FFmpeg Electronic Arts cdata demuxer     ffmpeg: fftype_ea: no extensions     ffmpeg:  ffdemux_ea: FFmpeg Electronic Arts Multimedia Format demuxer     ffmpeg: fftype_dxa: no extensions     ffmpeg:  ffdemux_dxa: FFmpeg DXA demuxer     ffmpeg:  ffdemux_dv: FFmpeg DV video format demuxer     ffmpeg: fftype_dsicin: no extensions     ffmpeg:  ffdemux_dsicin: FFmpeg Delphine Software International CIN format demuxer     ffmpeg: fftype_daud: 302     ffmpeg:  ffdemux_daud: FFmpeg D-Cinema audio format demuxer     ffmpeg: fftype_cdg: cdg     ffmpeg:  ffdemux_cdg: FFmpeg CD Graphics Format demuxer     ffmpeg: fftype_caf: no extensions     ffmpeg:  ffdemux_caf: FFmpeg Apple Core Audio Format demuxer     ffmpeg: fftype_c93: no extensions     ffmpeg:  ffdemux_c93: FFmpeg Interplay C93 demuxer     ffmpeg: fftype_bink: no extensions     ffmpeg:  ffdemux_bink: FFmpeg Bink demuxer     ffmpeg: fftype_bfi: no extensions     ffmpeg:  ffdemux_bfi: FFmpeg Brute Force & Ignorance demuxer     ffmpeg: fftype_bethsoftvid: no extensions     ffmpeg:  ffdemux_bethsoftvid: FFmpeg Bethesda Softworks VID format demuxer     ffmpeg: fftype_avs: no extensions     ffmpeg:  ffdemux_avs: FFmpeg AVS format demuxer     ffmpeg:  ffdemux_avi: FFmpeg AVI format demuxer     ffmpeg:  ffdemux_au: FFmpeg SUN AU format demuxer     ffmpeg:  ffdemux_asf: FFmpeg ASF format demuxer     ffmpeg:  ffdemux_ape: FFmpeg Monkey's Audio demuxer     ffmpeg: fftype_apc: no extensions     ffmpeg:  ffdemux_apc: FFmpeg CRYO APC format demuxer     ffmpeg: fftype_anm: no extensions     ffmpeg:  ffdemux_anm: FFmpeg Deluxe Paint Animation demuxer     ffmpeg:  ffdemux_amr: FFmpeg 3GPP AMR file format demuxer     ffmpeg:  ffdemux_aiff: FFmpeg Audio IFF demuxer     ffmpeg: fftype_aea: aea     ffmpeg:  ffdemux_aea: FFmpeg MD STUDIO audio demuxer     ffmpeg:  ffdec_xsub: FFmpeg XSUB decoder     ffmpeg:  ffdec_pgssub: FFmpeg HDMV Presentation Graphic Stream subtitles decoder     ffmpeg:  ffdec_dvdsub: FFmpeg DVD subtitles decoder     ffmpeg:  ffdec_dvbsub: FFmpeg DVB subtitles decoder     ffmpeg:  ffdec_adpcm_yamaha: FFmpeg ADPCM Yamaha decoder     ffmpeg:  ffdec_adpcm_xa: FFmpeg ADPCM CDROM XA decoder     ffmpeg:  ffdec_adpcm_thp: FFmpeg ADPCM Nintendo Gamecube THP decoder     ffmpeg:  ffdec_adpcm_swf: FFmpeg ADPCM Shockwave Flash decoder     ffmpeg:  ffdec_adpcm_sbpro_4: FFmpeg ADPCM Sound Blaster Pro 4-bit decoder     ffmpeg:  ffdec_adpcm_sbpro_3: FFmpeg ADPCM Sound Blaster Pro 2.6-bit decoder     ffmpeg:  ffdec_adpcm_sbpro_2: FFmpeg ADPCM Sound Blaster Pro 2-bit decoder     ffmpeg:  ffdec_adpcm_ms: FFmpeg ADPCM Microsoft decoder     ffmpeg:  ffdec_adpcm_ima_ws: FFmpeg ADPCM IMA Westwood decoder     ffmpeg:  ffdec_adpcm_ima_wav: FFmpeg ADPCM IMA WAV decoder     ffmpeg:  ffdec_adpcm_ima_smjpeg: FFmpeg ADPCM IMA Loki SDL MJPEG decoder     ffmpeg:  ffdec_adpcm_ima_qt: FFmpeg ADPCM IMA QuickTime decoder     ffmpeg:  ffdec_adpcm_ima_iss: FFmpeg ADPCM IMA Funcom ISS decoder     ffmpeg:  ffdec_adpcm_ima_ea_sead: FFmpeg ADPCM IMA Electronic Arts SEAD decoder     ffmpeg:  ffdec_adpcm_ima_ea_eacs: FFmpeg ADPCM IMA Electronic Arts EACS decoder     ffmpeg:  ffdec_adpcm_ima_dk4: FFmpeg ADPCM IMA Duck DK4 decoder     ffmpeg:  ffdec_adpcm_ima_dk3: FFmpeg ADPCM IMA Duck DK3 decoder     ffmpeg:  ffdec_adpcm_ima_amv: FFmpeg ADPCM IMA AMV decoder     ffmpeg:  ffdec_g726: FFmpeg G.726 ADPCM decoder     ffmpeg:  ffdec_adpcm_ea_xas: FFmpeg ADPCM Electronic Arts XAS decoder     ffmpeg:  ffdec_adpcm_ea_r3: FFmpeg ADPCM Electronic Arts R3 decoder     ffmpeg:  ffdec_adpcm_ea_r2: FFmpeg ADPCM Electronic Arts R2 decoder     ffmpeg:  ffdec_adpcm_ea_r1: FFmpeg ADPCM Electronic Arts R1 decoder     ffmpeg:  ffdec_adpcm_ea_maxis_xa: FFmpeg ADPCM Electronic Arts Maxis CDROM XA decoder     ffmpeg:  ffdec_adpcm_ea: FFmpeg ADPCM Electronic Arts decoder     ffmpeg:  ffdec_adpcm_ct: FFmpeg ADPCM Creative Technology decoder     ffmpeg:  ffdec_adpcm_adx: FFmpeg SEGA CRI ADX ADPCM decoder     ffmpeg:  ffdec_adpcm_4xm: FFmpeg ADPCM 4X Movie decoder     ffmpeg:  ffdec_xan_dpcm: FFmpeg DPCM Xan decoder     ffmpeg:  ffdec_sol_dpcm: FFmpeg DPCM Sol decoder     ffmpeg:  ffdec_roq_dpcm: FFmpeg DPCM id RoQ decoder     ffmpeg:  ffdec_interplay_dpcm: FFmpeg DPCM Interplay decoder     ffmpeg:  ffdec_ws_snd1: FFmpeg Westwood Audio (SND1) decoder     ffmpeg:  ffdec_wmavoice: FFmpeg Windows Media Audio Voice decoder     ffmpeg:  ffdec_wmav2: FFmpeg Windows Media Audio 2 decoder     ffmpeg:  ffdec_wmav1: FFmpeg Windows Media Audio 1 decoder     ffmpeg:  ffdec_wmapro: FFmpeg Windows Media Audio 9 Professional decoder     ffmpeg:  ffdec_vmdaudio: FFmpeg Sierra VMD audio decoder     ffmpeg:  ffdec_twinvq: FFmpeg VQF TwinVQ decoder     ffmpeg:  ffdec_tta: FFmpeg True Audio (TTA) decoder     ffmpeg:  ffdec_truespeech: FFmpeg DSP Group TrueSpeech decoder     ffmpeg:  ffdec_truehd: FFmpeg TrueHD decoder     ffmpeg:  ffdec_sonic: FFmpeg Sonic decoder     ffmpeg:  ffdec_smackaud: FFmpeg Smacker audio decoder     ffmpeg:  ffdec_sipr: FFmpeg RealAudio SIPR / ACELP.NET decoder     ffmpeg:  ffdec_shorten: FFmpeg Shorten decoder     ffmpeg:  ffdec_real_288: FFmpeg RealAudio 2.0 (28.8K) decoder     ffmpeg:  ffdec_real_144: FFmpeg RealAudio 1.0 (14.4K) decoder     ffmpeg:  ffdec_qdm2: FFmpeg QDesign Music Codec 2 decoder     ffmpeg:  ffdec_qcelp: FFmpeg QCELP / PureVoice decoder     ffmpeg:  ffdec_nellymoser: FFmpeg Nellymoser Asao decoder     ffmpeg:  ffdec_mpc8: FFmpeg Musepack SV8 decoder     ffmpeg:  ffdec_mpc7: FFmpeg Musepack SV7 decoder     ffmpeg:  ffdec_mp3on4: FFmpeg MP3onMP4 decoder     ffmpeg:  ffdec_mp3adu: FFmpeg ADU (Application Data Unit) MP3 (MPEG audio layer 3) decoder     ffmpeg:  ffdec_mp3: FFmpeg MP3 (MPEG audio layer 3) decoder     ffmpeg:  ffdec_mlp: FFmpeg MLP (Meridian Lossless Packing) decoder     ffmpeg:  ffdec_mace6: FFmpeg MACE (Macintosh Audio Compression/Expansion) 6:1 decoder     ffmpeg:  ffdec_mace3: FFmpeg MACE (Macintosh Audio Compression/Expansion) 3:1 decoder     ffmpeg:  ffdec_imc: FFmpeg IMC (Intel Music Coder) decoder     ffmpeg:  ffdec_flac: FFmpeg FLAC (Free Lossless Audio Codec) decoder     ffmpeg:  ffdec_eac3: FFmpeg ATSC A/52B (AC-3, E-AC-3) decoder     ffmpeg:  ffdec_dsicinaudio: FFmpeg Delphine Software International CIN audio decoder     ffmpeg:  ffdec_dca: FFmpeg DCA (DTS Coherent Acoustics) decoder     ffmpeg:  ffdec_cook: FFmpeg COOK decoder     ffmpeg:  ffdec_binkaudio_rdft: FFmpeg Bink Audio (RDFT) decoder     ffmpeg:  ffdec_binkaudio_dct: FFmpeg Bink Audio (DCT) decoder     ffmpeg:  ffdec_atrac3: FFmpeg Atrac 3 (Adaptive TRansform Acoustic Coding 3) decoder     ffmpeg:  ffdec_atrac1: FFmpeg Atrac 1 (Adaptive TRansform Acoustic Coding) decoder     ffmpeg:  ffdec_ape: FFmpeg Monkey's Audio decoder     ffmpeg:  ffdec_amrnb: FFmpeg Adaptive Multi-Rate NarrowBand decoder     ffmpeg:  ffdec_als: FFmpeg MPEG-4 Audio Lossless Coding (ALS) decoder     ffmpeg:  ffdec_alac: FFmpeg ALAC (Apple Lossless Audio Codec) decoder     ffmpeg:  ffdec_ac3: FFmpeg ATSC A/52A (AC-3) decoder     ffmpeg:  ffdec_aac: FFmpeg Advanced Audio Coding decoder     ffmpeg:  ffdec_zmbv: FFmpeg Zip Motion Blocks Video decoder     ffmpeg:  ffdec_zlib: FFmpeg LCL (LossLess Codec Library) ZLIB decoder     ffmpeg:  ffdec_yop: FFmpeg Psygnosis YOP Video decoder     ffmpeg:  ffdec_xl: FFmpeg Miro VideoXL decoder     ffmpeg:  ffdec_xan_wc3: FFmpeg Wing Commander III / Xan decoder     ffmpeg:  ffdec_wnv1: FFmpeg Winnov WNV1 decoder     ffmpeg:  ffdec_wmv3: FFmpeg Windows Media Video 9 decoder     ffmpeg:  ffdec_wmv2: FFmpeg Windows Media Video 8 decoder     ffmpeg:  ffdec_wmv1: FFmpeg Windows Media Video 7 decoder     ffmpeg:  ffdec_vqavideo: FFmpeg Westwood Studios VQA (Vector Quantized Animation) video decoder     ffmpeg:  ffdec_vp6f: FFmpeg On2 VP6 (Flash version) decoder     ffmpeg:  ffdec_vp6a: FFmpeg On2 VP6 (Flash version, with alpha channel) decoder     ffmpeg:  ffdec_vp6: FFmpeg On2 VP6 decoder     ffmpeg:  ffdec_vp5: FFmpeg On2 VP5 decoder     ffmpeg:  ffdec_vp3: FFmpeg On2 VP3 decoder     ffmpeg:  ffdec_vmnc: FFmpeg VMware Screen Codec / VMware Video decoder     ffmpeg:  ffdec_vmdvideo: FFmpeg Sierra VMD video decoder     ffmpeg:  ffdec_vcr1: FFmpeg ATI VCR1 decoder     ffmpeg:  ffdec_vc1: FFmpeg SMPTE VC-1 decoder     ffmpeg:  ffdec_vb: FFmpeg Beam Software VB decoder     ffmpeg:  ffdec_ultimotion: FFmpeg IBM UltiMotion decoder     ffmpeg:  ffdec_txd: FFmpeg Renderware TXD (TeXture Dictionary) image decoder     ffmpeg:  ffdec_camtasia: FFmpeg TechSmith Screen Capture Codec decoder     ffmpeg:  ffdec_truemotion2: FFmpeg Duck TrueMotion 2.0 decoder     ffmpeg:  ffdec_truemotion1: FFmpeg Duck TrueMotion 1.0 decoder     ffmpeg:  ffdec_tmv: FFmpeg 8088flex TMV decoder     ffmpeg:  ffdec_tiff: FFmpeg TIFF image decoder     ffmpeg:  ffdec_tiertexseqvideo: FFmpeg Tiertex Limited SEQ video decoder     ffmpeg:  ffdec_thp: FFmpeg Nintendo Gamecube THP video decoder     ffmpeg:  ffdec_targa: FFmpeg Truevision Targa image decoder     ffmpeg:  ffdec_svq3: FFmpeg Sorenson Vector Quantizer 3 / Sorenson Video 3 / SVQ3 decoder     ffmpeg:  ffdec_svq1: FFmpeg Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1 decoder     ffmpeg:  ffdec_sunrast: FFmpeg Sun Rasterfile image decoder     ffmpeg:  ffdec_sp5x: FFmpeg Sunplus JPEG (SP5X) decoder     ffmpeg:  ffdec_snow: FFmpeg Snow decoder     ffmpeg:  ffdec_smc: FFmpeg QuickTime Graphics (SMC) decoder     ffmpeg:  ffdec_smackvid: FFmpeg Smacker video decoder     ffmpeg:  ffdec_sgi: FFmpeg SGI image decoder     ffmpeg:  ffdec_rv40: FFmpeg RealVideo 4.0 decoder     ffmpeg:  ffdec_rv30: FFmpeg RealVideo 3.0 decoder     ffmpeg:  ffdec_rv20: FFmpeg RealVideo 2.0 decoder     ffmpeg:  ffdec_rv10: FFmpeg RealVideo 1.0 decoder     ffmpeg:  ffdec_rpza: FFmpeg QuickTime video (RPZA) decoder     ffmpeg:  ffdec_roqvideo: FFmpeg id RoQ video decoder     ffmpeg:  ffdec_rl2: FFmpeg RL2 video decoder     ffmpeg:  ffdec_qtrle: FFmpeg QuickTime Animation (RLE) video decoder     ffmpeg:  ffdec_qpeg: FFmpeg Q-team QPEG decoder     ffmpeg:  ffdec_qdraw: FFmpeg Apple QuickDraw decoder     ffmpeg:  ffdec_ptx: FFmpeg V.Flash PTX image decoder     ffmpeg:  ffdec_ppm: FFmpeg PPM (Portable PixelMap) image decoder     ffmpeg:  ffdec_png: FFmpeg PNG image decoder     ffmpeg:  ffdec_pgmyuv: FFmpeg PGMYUV (Portable GrayMap YUV) image decoder     ffmpeg:  ffdec_pgm: FFmpeg PGM (Portable GrayMap) image decoder     ffmpeg:  ffdec_pcx: FFmpeg PC Paintbrush PCX image decoder     ffmpeg:  ffdec_pbm: FFmpeg PBM (Portable BitMap) image decoder     ffmpeg:  ffdec_pam: FFmpeg PAM (Portable AnyMap) image decoder     ffmpeg:  ffdec_nuv: FFmpeg NuppelVideo/RTJPEG decoder     ffmpeg:  ffdec_mszh: FFmpeg LCL (LossLess Codec Library) MSZH decoder     ffmpeg:  ffdec_msvideo1: FFmpeg Microsoft Video 1 decoder     ffmpeg:  ffdec_msrle: FFmpeg Microsoft RLE decoder     ffmpeg:  ffdec_msmpeg4: FFmpeg MPEG-4 part 2 Microsoft variant version 3 decoder     ffmpeg:  ffdec_msmpeg4v2: FFmpeg MPEG-4 part 2 Microsoft variant version 2 decoder     ffmpeg:  ffdec_msmpeg4v1: FFmpeg MPEG-4 part 2 Microsoft variant version 1 decoder     ffmpeg:  ffdec_mpegvideo: FFmpeg MPEG-1 video decoder     ffmpeg:  ffdec_mpeg4: FFmpeg MPEG-4 part 2 decoder     ffmpeg:  ffdec_mpeg2video: FFmpeg MPEG-2 video decoder     ffmpeg:  ffdec_motionpixels: FFmpeg Motion Pixels video decoder     ffmpeg:  ffdec_mmvideo: FFmpeg American Laser Games MM Video decoder     ffmpeg:  ffdec_mjpegb: FFmpeg Apple MJPEG-B decoder     ffmpeg:  ffdec_mjpeg: FFmpeg MJPEG (Motion JPEG) decoder     ffmpeg:  ffdec_mimic: FFmpeg Mimic decoder     ffmpeg:  ffdec_mdec: FFmpeg Sony PlayStation MDEC (Motion DECoder) decoder     ffmpeg:  ffdec_loco: FFmpeg LOCO decoder     ffmpeg:  ffdec_kmvc: FFmpeg Karl Morton's video codec decoder     ffmpeg:  ffdec_kgv1: FFmpeg Kega Game Video decoder     ffmpeg:  ffdec_jpegls: FFmpeg JPEG-LS decoder     ffmpeg:  ffdec_interplayvideo: FFmpeg Interplay MVE video decoder     ffmpeg:  ffdec_indeo5: FFmpeg Intel Indeo Video Interactive 5 decoder     ffmpeg:  ffdec_indeo3: FFmpeg Intel Indeo 3 decoder     ffmpeg:  ffdec_indeo2: FFmpeg Intel Indeo 2 decoder     ffmpeg:  ffdec_iff_ilbm: FFmpeg IFF ILBM decoder     ffmpeg:  ffdec_iff_byterun1: FFmpeg IFF ByteRun1 decoder     ffmpeg:  ffdec_idcinvideo: FFmpeg id Quake II CIN video decoder     ffmpeg:  ffdec_huffyuv: FFmpeg Huffyuv / HuffYUV decoder     ffmpeg:  ffdec_h264: FFmpeg H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 decoder     ffmpeg:  ffdec_h263i: FFmpeg Intel H.263 decoder     ffmpeg:  ffdec_h263: FFmpeg H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2 decoder     ffmpeg:  ffdec_h261: FFmpeg H.261 decoder     ffmpeg:  ffdec_FRWU: FFmpeg Forward Uncompressed decoder     ffmpeg:  ffdec_fraps: FFmpeg Fraps decoder     ffmpeg:  ffdec_4xm: FFmpeg 4X Movie decoder     ffmpeg:  ffdec_flv: FFmpeg Flash Video (FLV) / Sorenson Spark / Sorenson H.263 decoder     ffmpeg:  ffdec_flic: FFmpeg Autodesk Animator Flic video decoder     ffmpeg:  ffdec_flashsv: FFmpeg Flash Screen Video v1 decoder     ffmpeg:  ffdec_ffvhuff: FFmpeg Huffyuv FFmpeg variant decoder     ffmpeg:  ffdec_ffv1: FFmpeg FFmpeg video codec #1 decoder     ffmpeg:  ffdec_escape124: FFmpeg Escape 124 decoder     ffmpeg:  ffdec_8svx_fib: FFmpeg 8SVX fibonacci decoder     ffmpeg:  ffdec_8svx_exp: FFmpeg 8SVX exponential decoder     ffmpeg:  ffdec_8bps: FFmpeg QuickTime 8BPS video decoder     ffmpeg:  ffdec_eatqi: FFmpeg Electronic Arts TQI Video decoder     ffmpeg:  ffdec_eatgv: FFmpeg Electronic Arts TGV video decoder     ffmpeg:  ffdec_eatgq: FFmpeg Electronic Arts TGQ video decoder     ffmpeg:  ffdec_eamad: FFmpeg Electronic Arts Madcow Video decoder     ffmpeg:  ffdec_eacmv: FFmpeg Electronic Arts CMV video decoder     ffmpeg:  ffdec_dxa: FFmpeg Feeble Files/ScummVM DXA decoder     ffmpeg:  ffdec_dvvideo: FFmpeg DV (Digital Video) decoder     ffmpeg:  ffdec_dsicinvideo: FFmpeg Delphine Software International CIN video decoder     ffmpeg:  ffdec_dpx: FFmpeg DPX image decoder     ffmpeg:  ffdec_dnxhd: FFmpeg VC3/DNxHD decoder     ffmpeg:  ffdec_cyuv: FFmpeg Creative YUV (CYUV) decoder     ffmpeg:  ffdec_camstudio: FFmpeg CamStudio decoder     ffmpeg:  ffdec_cljr: FFmpeg Cirrus Logic AccuPak decoder     ffmpeg:  ffdec_cinepak: FFmpeg Cinepak decoder     ffmpeg:  ffdec_cdgraphics: FFmpeg CD Graphics video decoder     ffmpeg:  ffdec_cavs: FFmpeg Chinese AVS video (AVS1-P2, JiZhun profile) decoder     ffmpeg:  ffdec_c93: FFmpeg Interplay C93 decoder     ffmpeg:  ffdec_bmp: FFmpeg BMP image decoder     ffmpeg:  ffdec_binkvideo: FFmpeg Bink video decoder     ffmpeg:  ffdec_bfi: FFmpeg Brute Force & Ignorance decoder     ffmpeg:  ffdec_bethsoftvid: FFmpeg Bethesda VID video decoder     ffmpeg:  ffdec_avs: FFmpeg AVS (Audio Video Standard) video decoder     ffmpeg:  ffdec_aura2: FFmpeg Auravision Aura 2 decoder     ffmpeg:  ffdec_aura: FFmpeg Auravision AURA decoder     ffmpeg:  ffdec_asv2: FFmpeg ASUS V2 decoder     ffmpeg:  ffdec_asv1: FFmpeg ASUS V1 decoder     ffmpeg:  ffdec_anm: FFmpeg Deluxe Paint Animation decoder     ffmpeg:  ffdec_amv: FFmpeg AMV Video decoder     ffmpeg:  ffdec_aasc: FFmpeg Autodesk RLE decoder     ffmpeg:  ffenc_xsub: FFmpeg DivX subtitles (XSUB) encoder     ffmpeg:  ffenc_dvdsub: FFmpeg DVD subtitles encoder     ffmpeg:  ffenc_dvbsub: FFmpeg DVB subtitles encoder     ffmpeg:  ffenc_adpcm_yamaha: FFmpeg ADPCM Yamaha encoder     ffmpeg:  ffenc_adpcm_swf: FFmpeg ADPCM Shockwave Flash encoder     ffmpeg:  ffenc_adpcm_ms: FFmpeg ADPCM Microsoft encoder     ffmpeg:  ffenc_adpcm_ima_wav: FFmpeg ADPCM IMA WAV encoder     ffmpeg:  ffenc_adpcm_ima_qt: FFmpeg ADPCM IMA QuickTime encoder     ffmpeg:  ffenc_g726: FFmpeg G.726 ADPCM encoder     ffmpeg:  ffenc_adpcm_adx: FFmpeg SEGA CRI ADX ADPCM encoder     ffmpeg:  ffenc_roq_dpcm: FFmpeg id RoQ DPCM encoder     ffmpeg:  ffenc_wmav2: FFmpeg Windows Media Audio 2 encoder     ffmpeg:  ffenc_wmav1: FFmpeg Windows Media Audio 1 encoder     ffmpeg:  ffenc_sonicls: FFmpeg Sonic lossless encoder     ffmpeg:  ffenc_sonic: FFmpeg Sonic encoder     ffmpeg:  ffenc_nellymoser: FFmpeg Nellymoser Asao encoder     ffmpeg:  ffenc_mp2: FFmpeg MP2 (MPEG audio layer 2) encoder     ffmpeg:  ffenc_alac: FFmpeg ALAC (Apple Lossless Audio Codec) encoder     ffmpeg:  ffenc_ac3: FFmpeg ATSC A/52A (AC-3) encoder     ffmpeg:  ffenc_aac: FFmpeg Advanced Audio Coding encoder     ffmpeg:  ffenc_zmbv: FFmpeg Zip Motion Blocks Video encoder     ffmpeg:  ffenc_wmv2: FFmpeg Windows Media Video 8 encoder     ffmpeg:  ffenc_wmv1: FFmpeg Windows Media Video 7 encoder     ffmpeg:  ffenc_tiff: FFmpeg TIFF image encoder     ffmpeg:  ffenc_targa: FFmpeg Truevision Targa image encoder     ffmpeg:  ffenc_svq1: FFmpeg Sorenson Vector Quantizer 1 / Sorenson Video 1 / SVQ1 encoder     ffmpeg:  ffenc_snow: FFmpeg Snow encoder     ffmpeg:  ffenc_sgi: FFmpeg SGI image encoder     ffmpeg:  ffenc_rv20: FFmpeg RealVideo 2.0 encoder     ffmpeg:  ffenc_rv10: FFmpeg RealVideo 1.0 encoder     ffmpeg:  ffenc_roqvideo: FFmpeg id RoQ video encoder     ffmpeg:  ffenc_qtrle: FFmpeg QuickTime Animation (RLE) video encoder     ffmpeg:  ffenc_ppm: FFmpeg PPM (Portable PixelMap) image encoder     ffmpeg:  ffenc_png: FFmpeg PNG image encoder     ffmpeg:  ffenc_pgmyuv: FFmpeg PGMYUV (Portable GrayMap YUV) image encoder     ffmpeg:  ffenc_pgm: FFmpeg PGM (Portable GrayMap) image encoder     ffmpeg:  ffenc_pcx: FFmpeg PC Paintbrush PCX image encoder     ffmpeg:  ffenc_pbm: FFmpeg PBM (Portable BitMap) image encoder     ffmpeg:  ffenc_pam: FFmpeg PAM (Portable AnyMap) image encoder     ffmpeg:  ffenc_msmpeg4: FFmpeg MPEG-4 part 2 Microsoft variant version 3 encoder     ffmpeg:  ffenc_msmpeg4v2: FFmpeg MPEG-4 part 2 Microsoft variant version 2 encoder     ffmpeg:  ffenc_msmpeg4v1: FFmpeg MPEG-4 part 2 Microsoft variant version 1 encoder     ffmpeg:  ffenc_mpeg4: FFmpeg MPEG-4 part 2 encoder     ffmpeg:  ffenc_mpeg2video: FFmpeg MPEG-2 video encoder     ffmpeg:  ffenc_mpeg1video: FFmpeg MPEG-1 video encoder     ffmpeg:  ffenc_mjpeg: FFmpeg MJPEG (Motion JPEG) encoder     ffmpeg:  ffenc_ljpeg: FFmpeg Lossless JPEG encoder     ffmpeg:  ffenc_jpegls: FFmpeg JPEG-LS encoder     ffmpeg:  ffenc_huffyuv: FFmpeg Huffyuv / HuffYUV encoder     ffmpeg:  ffenc_h263p: FFmpeg H.263+ / H.263-1998 / H.263 version 2 encoder     ffmpeg:  ffenc_h263: FFmpeg H.263 / H.263-1996 encoder     ffmpeg:  ffenc_h261: FFmpeg H.261 encoder     ffmpeg:  ffenc_flv: FFmpeg Flash Video (FLV) / Sorenson Spark / Sorenson H.263 encoder     ffmpeg:  ffenc_flashsv: FFmpeg Flash Screen Video encoder     ffmpeg:  ffenc_ffvhuff: FFmpeg Huffyuv FFmpeg variant encoder     ffmpeg:  ffenc_ffv1: FFmpeg FFmpeg video codec #1 encoder     ffmpeg:  ffenc_dvvideo: FFmpeg DV (Digital Video) encoder     ffmpeg:  ffenc_dnxhd: FFmpeg VC3/DNxHD encoder     ffmpeg:  ffenc_bmp: FFmpeg BMP image encoder     ffmpeg:  ffenc_asv2: FFmpeg ASUS V2 encoder     ffmpeg:  ffenc_asv1: FFmpeg ASUS V1 encoder     postproc:  postproc_ffmpegdeint: LibPostProc ffmpegdeint filter     ffmpegcolorspace:  ffmpegcolorspace: FFMPEG Colorspace converter


GNU emacs vs. XEmacs

After using Vim for the past couple of years, I'm switching to emacs as part of my "get out og your comfort zone" 2012 resolution. Although I have been using GNU Emacs for the past 10 days, I am curious about XEmacs and I wonder if it differs significantly from GNU Emacs. From the Wikipedia page: > One of the main disagreements involves different views of copyright- > assignment. > > [...] > > New features in either editor usually show up in the other sooner or later. > Furthermore, many developers contribute to both projects. I get the impression that the differences between the two are mainly historical and philosophical (isn't always the case with the FSF?). What would be the practical reasons to chose one over the other today in 2012? Here are examples of comparisons I'm interested in:   * **features** : Are there any feature present in one but not (or at least not easily available) in the other?   * **community** : Which community is more active and innovative?    * **release cycles** : Do they release the same features at a similar rate, or is it two separate releasing cycles making one more avant-garde than the other?   * **LISP implementation** : I'm mostly interested in learning LISP. Do both editors share the same implementation? The same dialect?   * **availability** : I know both editors are available on Linux, but what about the other platforms? Does one have a significant advantage over the other? The list is not exhaustive. If you've ever used both and feel that there are differences that are not mentioned here, please do tell; I'm very curious.


What does '//' mean in return from `which`

I have an executable script `test` under the full path `/home/sawa/foo/bar/test`. The directory `/home/sawa/foo/bar` is within `$PATH`, and has priority over the default ones including `/usr/bin`. When I do               `which test`      to see whether this command is correctly recognized, it returns               /home/sawa/foo/bar//test      with the double slash `//`. I know that there is a built in command with the same name `test`, and when I remove mine, this one under `/usr/bin/test` is returned by `which`, so I think it's interfereing in some way.   1. What does this double slash mean here, and why is it appearing here?   2. My executable `test` does not seem to work correctly. Why is that?


Check for, and add, missing timestamps to individual lines in a file

I have a file in the following format:               ABCD 01206001022T01YA022T01YA022T07SO 09:20:38     ABCD 01206001022ACION 09:24:40     ABCD 04006001021S01UK 09:24:42     ABCD 7878696621321312 23213213213213     ABCD ASADSADSFSSDSSD 09:24:50      Basically except the first field, all other fields are different. Requirement: I want timestamp on each line. If a timestamp is missing on any line, I want to append the timestamp of the previous line to the end of missing line (Example 4th line above). How can I achieve this?


User-local package management system

I need to deploy, manage and run software as a non-privileged user in SuSE (that is, no root access whatsoever, can't use system's package management, etc). What are my options? I'd prefer reusing system's package manager (YaST) by somehow setting up a separate user-local repository. Second best choice is a separate package management system that supports user-local repositories. Preferably it would also support push-style updates (as opposed to pull).


Stop tailing log

I have a problem, I accidentally did tail -f on a log, but now I cant quit! - Its the anaconda log during a redhat install. Control-C doesn't seem to work, I guess due to it saying sh: no job control in this shell ? But I really need to stop tailing as the install is one, and I have to reboot the box.


If UID=1000 continues, else exit

I am wondering how to implement the following in a bash script.               if UID=1000, continue     else exit     confirm choice (y/n)


Gnome3 defaults to fallback

I'm new to Arch Linux and I've installed Gnome3. When I start it, it just offered me a fallback mode, that's not bad, I mean I've been using it for several days. But I'd like to try the standard mode now. My graphics card is ATI(HD 6470M & 6520G) and I've installed `xf86-video-ati` but Gnome3 just failed to fallback mode... And after I typed `gnome-shell --replace`, it shows:               failed to create drawable     (gnome-shell:1497): Clutter-CRITICAL **: Unable to initialize Clutter: Unable to select the newly created GLX context     Error window manager: Unable to initialize Clutter. Also there's `nomodeset` in this file: `grub.cfg`, and if I remove it, I could just get a black screen... I really don't know what should I do... how can I solve this problem? Any advice?


How to signal the end of stdin input in bash

1. In Bash, I learned that the ending signal can be changed by here document. But by default how can I signal the end of stdin input?   2. I happened to find that with cat and chardet, their stdin inputs can be signaled as finished by Ctrl+d. But I seems to remember that Ctrl+d and Ctrl+c are similar to ending execution of a running command. So am I wrong?


How to report "sed" in-place changes

When using `sed` to replace strings in-place, is there a way to make it report the changes it does (without relying on a diff of old and new files)? For instance, how can I change the command line               find . -type f | xargs sed -i 's/abc/def/g'      so I can see the changes that are made on the fly?


HP-UX itanium cannot log in or connect

I just had this problem where suddenly I cannot ssh into my HP-UX itanium, but still can ping. Few hours before that, I was still able to so. I tried to force reboot (Pressing the power button). Then, I cannot ssh or ping to the server anymore. My only available option now is to use a serial monitor. After connecting through serial, I found out that all the command in normal shell are now unable to use. Have anyone ever tried debuging using a serial connection? I've googled for manual or guide but still can't find any. Here is a detail of the server: > HP-UX itanium rx2800 > > HP serial monitor EM100 **Edit:** As I mentioned about the command that is unable to use, it is because I was in the EFI shell. I have addaed some picture. Maybe this can help to give more information. ![enter image description here](http://i.stack.imgur.com/Yh56u.jpg) ![enter image description here](http://i.stack.imgur.com/jFYbT.jpg) ![enter image description here](http://i.stack.imgur.com/zRdge.jpg) ![enter image description here](http://i.stack.imgur.com/HxrFh.jpg) **EDIT:** I've editted 2 more picture when the server first power on. There seems to be some error about the SCSI which is the hard disk. I would like to assume that the hard disk is the cause for this problem, but I'm not really sure. I've also tried to follow this link link, where I tried to reset the configuration back as default. The EFI Shell seems like it doesnt understand the command. ![enter image description here](http://i.stack.imgur.com/FdyoS.jpg) ![enter image description here](http://i.stack.imgur.com/F9J1P.jpg)


Why is my keyboard input slow in Xorg?

Ok, this is really strange. I have a pretty bare setup of ubuntu where I start awesomewm and a number of other programs from an .xsession. I'm not running Gnome 3 or anything heavy like that and I've even stopped as many running processes as can to try to figure out what's causing this, to no avail. What I'm seeing is, after maybe an hour after booting my laptop keyboard input gets slow. It's almost like it's adding a 300ms timeout to every keystroke, as if it's waiting for some other keystroke that will trigger some magic combination. If I just type quickly I can't see it for anything except the final keystroke which takes 300ms-1s to display. It's hard to time it, obviously. Weirder still, if I look at a terminal with a blinking cursor I can see that the blinking is not constant. Normally I think it's something like 1s on 1s off, but now it is totally sporadic. I was worried it would be a hardware issue, but when I use a real terminal (ie not in Xorg, Ctrl-Alt-F1, the problem is gone. `dmesg` doesn't really say anything interesting. Neither does `/var/log/Xorg.0.log`. Anyone have any ideas? I think this might be easier to solve in realtime; I'm `frew` on freenode. Feel free to ping and maybe you can help (and of course write what worked here and get the credit.)


How can I pipe the output of a program or function into a variable? For example lets say I have this script:               function foobarize () {         sed \         -e "s|${foo}|${bar}|g" \         $1     }          echo foo | foobarize | set THIS_VARIABLE      Obviously it won't work to set the value of `THIS_VARIABLE`. But if I do:               THIS_VARIABLE=$(echo foo | foobarize)      ... that doesn't work either because it strips any trailing newlines. So how do I get the output of `foobarize` into `THIS_VARIABLE` without using back-ticks or $() ?


Fork call and recursion

#include <stdio.h>     #include <stdlib.h>     #include <string.h>          int main(int argc, char *argv[])     {         fork();         fork();         fork();              puts("hi");              return 0;     }      This program prints 8 times "hi" and exits. Why? Is not each `fork` calling `main` recursively as in: `f(): "hi"; f()`?


Is there any reason to have ntpd sync to Local(0) if server is not used as a time source?

Running CentOS release 5.8 I had a time drift issue on a server which I fixed - it was not syncing the hwclock so that on a reboot ntp would be more than 1000 seconds off and never sync time. While investigating the problem I noticed that ntpd was synchronizing to Local(0) regularly. # Is there any reason to have ntpd configured to sync to Local(0) when this server is never going to be used as a time source? "The Answer" - you don't need to use Undisciplined Local Clock unless you want to use this server as a local time server when connecting to other time servers fail. Log messages from ntpd:               Jul 20 03:47:49 localhost ntpd[5441]: synchronized to 110.14.8.1, stratum 3     Jul 20 04:21:06 localhost ntpd[5441]: synchronized to LOCAL(0), stratum 10     Jul 20 04:38:09 localhost ntpd[5441]: synchronized to 110.14.8.1, stratum 3     Jul 20 04:55:26 localhost ntpd[5441]: synchronized to LOCAL(0), stratum 10      ntpd.conf:               # Use public servers from the pool.ntp.org project.     # Please consider joining the pool (http://www.pool.ntp.org/join.html).     server 10.4.58.21     # Undisciplined Local Clock. This is a fake driver intended for backup     # and when no outside source of synchronized time is available.     server  127.127.1.0     # local clock     fudge   127.127.1.0 stratum 10      We are going to disable local-sync, but still curious why the local-sync is happening at all. We put a temporary time server in place on the same sub-net, and ntpd still syncs to local time. (* Possible answer: ntpdc -c sysinfo stats that the startum of the ntp server is 11 which is worse than the 10 we told ntpd to use for the local. Time to go look at the source for ntpd *)               Jul 24 17:11:32 localhost ntpdate[5432]: step time server 227.220.222.220 offset 1629.764734 sec     Jul 24 17:11:32 localhost ntpd[5434]: ntpd 4.2.2p1@1.1570-o Fri Nov 18 13:21:21 UTC 2011 (1)     Jul 24 17:11:32 localhost ntpd[5435]: precision = 1.000 usec     Jul 24 17:11:32 localhost ntpd[5435]: Listening on interface wildcard, 0.0.0.0#123 Disabled     Jul 24 17:11:32 localhost ntpd[5435]: Listening on interface wildcard, ::#123 Disabled     Jul 24 17:11:32 localhost ntpd[5435]: Listening on interface eth0 Enabled     Jul 24 17:11:32 localhost ntpd[5435]: Listening on interface lo, ::1#123 Enabled     Jul 24 17:11:32 localhost ntpd[5435]: Listening on interface lo, 127.0.0.1#123 Enabled     Jul 24 17:11:32 localhost ntpd[5435]: Listening on interface eth0, 192.12.140.55#123 Enabled     Jul 24 17:11:32 localhost ntpd[5435]: kernel time sync status 0040     Jul 24 17:11:32 localhost ntpd[5435]: frequency initialized 0.000 PPM from /var/lib/ntp/drift     Jul 24 17:14:48 localhost ntpd[5435]: synchronized to LOCAL(0), stratum 10     Jul 24 17:16:55 localhost ntpd[5435]: synchronized to 192.12.140.200, stratum 3     Jul 24 20:11:06 localhost ntpd[5435]: synchronized to LOCAL(0), stratum 10     Jul 24 20:20:50 localhost ntpd[5435]: synchronized to 192.12.140.200, stratum 3


Delete all files in directories except those whose path are listed in a file

Given the following files:               data/A/a.txt     data/B/b.pdf     ...     date/P/whatever.log     ...     data/Z/z.jpg      I would like to delete all files in the `data/A/`, `data/B/`, ..., `data/Z/` directories _except_ those files that are situated under one of the directories listed in the file `data/dont_clean.txt`. For example, if we have `data/P` listed in `data/dont_clean.txt` then nothing should be touched under `data/P/`, etc. Something like:               find data/ -mindepth 2 -maxdepth 2 -type f -not -path {listed in data/dont_clean} -delete      Of course it is not a valid command. I have also tried variants of               find data/ -mindepth 2 -maxdepth 2 -type f -exec grep data/dont_clean.txt '{}' \;      but I only created either an invalid command or I had no idea why I got the output I did. I am using bash on Ubuntu 12.10


Squid block site except for some pages

I have Squid proxy server installed on my machine. I created a file `/etc/squid/block.acl`, where all the bad domains are written. And added the following statement to squid.conf:               acl bad_url url_regex "/etc/squid/block.acl"     http_access deny bad_url      Suppose, there is a domain: finam.ru. I want to block access to all its pages, except for these pages: `finam.ru/analysis/*` How to do it? I tried regexp, but it doesn't work.


Curl with ipv6 not working by default

I am trying to curl ipv6 addresses, but without success. If I try lets say: > curl https://google.com I wait for a timeout and get `network unreachable` If I force `ipv4`, everything is fine. > curl -4 https://google.com Then again if I force ipv6, like this: > curl -6 https://google.com I get: > curl: (7) Failed to connect to 2800:3f0:4001:806::1005: Network is > unreachable I suppose it has to do somehow with resolving `ipv6` addresses. I saw that on other computers that have a newer version of some Linux distro, these requests go fine, so I'm guessing it has to do something with me using `Ubuntu 10.10`, where this problem isn't solved. I want to be able to curl normally without using the option: `-4`, what do I have to modify to be able to use curl normally with `ipv6` addresses?


Unable to add source via command line

I am trying to install latest version of glusterfs in Ubuntu by running this command:               apt-add-repository ppa:semiosis/glusterfs-3.2      It does not give any result. The session won't even close (Ctrl+C not working). I had to close the terminal window to end the session. Error shown is:               Traceback (most recent call last):       File "/usr/bin/add-apt-repository", line 88, in <module>         ppa_info = get_ppa_info_from_lp(user, ppa_name)       File "/usr/lib/python2.7/dist-packages/softwareproperties/ppa.py",             line 80, in get_ppa_info_from_lp         curl.perform()     pycurl.error: (28, 'connect() timed out!')


Installing prstat package command on Ubuntu Linux

I'm trying to run the prstat command on my Ubuntu server, but it doesn't seem to be installed, I have searched the web for the package name needed to install it but without any luck for some reason.. I'm still surprised that `vmstat, iostat` and `vmstat` come pre-installed and work fine but `prstat` doesnt seem to exist...


How can I avoid the prompts when installing a FreeBSD port?

When I install a port, I am often presented with a menu screen to select configuration options. If I'm going to install a really big package with lots of dependencies, that will be extremely inconvenient. Is there a make flag for accepting the default answers for all such prompts?


system boot appears in last but not in /var/log/messages

I am looking after a Red Hat Enterprise Linux 5.4 server. A user sent me a copy of the output from the `last` command and it shows multiple reboots on different days (there is no visible pattern to the reboots) and, most of these reboots were not done by a user. When I checked the `/var/log/messages` files (all four of them), they all showed no reboots. I've checked the `/var/log/boot.log` files (five of them) and they're all blank - in fact they're all zero bytes in length. The entries in the `/var/log/messages` files do not show any "break" for the time that the last command shows that the system was rebooted. Why does one application record that the system was rebooted and another application has no record of the reboots?


How to fix boot failure after update

I did a `apt-get update` on Debian. After reboot the system lost its mount point and failed to boot. How could be accomplished to fix the boot failure?


tar + how to extract from /var/tmp in order to place the directories under /

I work with solaris 9 machine In order to extract the **list.tar** file I need to change directory to / And from there I do:                tar -xvf list.tar      Example               Cd /          tar -xvf list.tar                x usr/local/cds/api/SNMP/s_trap.pl, 7644 bytes, 15 tape blocks      x usr/local/cww/lib/Storage/SW.pl, 76537 bytes, 150 tape blocks      x etc/cs/shared/functions.pl, 13801 bytes, 27 tape blocks      x etc/cp/shared/globals.pl, 4042 bytes, 8 tape blocks      my question how to do the                tar –xvf from /var/tmp ? ( is it possible )      if I do that from /var/tmp , then tar will create the directorates under /var/tmp , in place to create then under / example                  /var/tmp/usr/…….      solaris tar usuage:                     Usage: tar {c|r|t|u|x}[BDeEFhilmnopPqTvw@[0-7]][bfk][X...] [blocksize] [tarfile] [size] [exclude-file...] {file | -I include-file | -C directory file}...


dd remove range of bytes

Given this file               $ cat hello.txt     hello doge world      I would like to remove a range of bytes to end up with this               $ cat hello.txt     heorld      I would like to do this with `dd` if possible. The reason is because I am already using `dd` to overwrite bytes in this manner               printf '\x5E' | dd conv=notrunc of=hello.txt bs=1 seek=$((0xE))      I prefer to write back to the same file, but a different output file would be okay.


Modifying TG3 Broadcom driver

I was wondering whether it's possible to modify the said driver in order to prevent adapter from using embedded SRAM, and use system RAM instead. And if so, how to do it. I have a laptop with Broadcom Netlink (BCM57780) Ethernet adapter, which apparently has bad memory chip: ![enter image description here](http://i.stack.imgur.com/HAmiu.jpg) It's fully functional (establishes connection with router and connects to Internet) for few seconds after plugging in the cable. Then it stops working, and immediately brings whole system to halt.


How to display every message in a thread with at least one new message?

I currently have a macro to quickly show only new messages:               macro index ,sn "l ^a^k~N\n"  "show only new messages"      However, this macro loses the context for new messages in ongoing threads. I would like to be able to modify it so that I'm able to display every message from a thread that has at least one new message in it. I've read the mutt manual a few times, but I don't see an obvious way to achieve this using standard limit patterns.


How to get comfortable in linux as an ex-windows user?

I've been using linux full time for about 8 years. Now and then I help someone else migrate from windows to linux. Because I don't often use windows, I often find myself forgetting some of the differences between the operating systems. I would like a guide that I can give to such users, to help them get more comfortable with using linux. The guide should include things like the drive mounting systems (`C:\bar\` vs. `/foo/bar/`), and software installation. There are lots of guides out there called "migrating/moving from windows to linux" or similar, but nearly all of them seem to be full of linux propaganda, or installation instructions. That's fine for other purposes, but I want a guide for someone who has already decided to move, (e.g. because they like the concept of open source), and for whom the system has already been installed. So a post-install "I've moved from windows to linux, now what?" kind of guide that covers _practical_ differences (i.e. not philosophical or highly technical) that an average windows user (Someone who uses a computer for websurfing, document editing, movie watching, game playing, etc.) might encounter. Do any such guides exist?


Bot requesting odd resource in apache logs

While studying for the RHSCA exam I set up my first home server and quickly found that bots had already started requesting commonly vulnerable files. It was alarming at first, then just purely amusing once I found out how harmless and ineffective these particular attempts were. Now I am seeing some odd requests in my apache access_log that I just don't understand and was hoping someone could help clarify for me. I don't understand why the bot would request another server from within my server's path. It's my understanding that the bot is requesting the following resource in the log shown below: http://MY.IP.ADD.RESS/http://61.152.144.145/judge.php               58.218.199.250 - - [15/Sep/2012:06:47:38 -0500] "GET http://61.152.144.145/judge.php HTTP/1.1" 404 287 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"      That just doesn't even make any sense. I am getting quite a few of these nonsensicle requests and I was wondering if requesting another server from someone else's server might in someway prove useful for an intruder or if this is just a retarded script kiddie that has no idea what he's doing. Some more examples of this in my access log.               58.218.199.250 - - [14/Sep/2012:05:28:48 -0500] "GET http://59.53.91.9/proxy/judge.php HTTP/1.1" 404 289 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"     59.53.91.9 - - [14/Sep/2012:08:26:55 -0500] "GET http://59.53.91.9/proxyheader.php HTTP/1.0" 404 289 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"     59.53.91.9 - - [14/Sep/2012:08:26:57 -0500] "GET http://www.yahoo.com/ HTTP/1.0" 200 101 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"     59.53.91.9 - - [14/Sep/2012:13:11:58 -0500] "GET http://59.53.91.9/proxyheader.php HTTP/1.0" 404 289 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"     59.53.91.9 - - [14/Sep/2012:13:11:59 -0500] "GET http://www.yahoo.com/ HTTP/1.0" 200 101 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)"     58.218.199.227 - - [14/Sep/2012:15:34:53 -0500] "GET http://59.53.91.9/httpproxy/proxyheader.php HTTP/1.1" 404 299 "-" "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)"      I am thinking that maybe these bots are requesting these files to encourage host administrators to actually visit these addresses due to their curiosity with the goal of gathering data, or something. I am thinking this mainly because I visited one and it did a whois lookup on me and displayed that information on the page. I only tried one so I don't know if that is a common pattern. In short, why are these bots requesting other websites from the file structure of my website? I'm using CentOs.


Creating numerous directories using mkdir

I would like to create many directories using `mkdir`. Each directory name will consist of a prefix (a string) and an index (an integer). Suppose that I would like the prefix to be "s" and the indices to range from 1 to 50. This means that I would like to create directories titled: `s1`, `s2`, ... , `s49`, `s50` Is there a way to do this automatically using `mkdir`? Thanks for your time.


Provide passphrase to plymouth ask-for-password from command line

I'm working on booting a headless server (Fedora 16), entering the passphrase to decrypt the root disk (LUKS) over SSH using dropbear. I've got dropbear all working: I can SSH to the server while it's sitting and waiting for the password. But I can't figure out how to actually pass the password to use. The crypt script that asks for the password and decrypts the volume uses the `plymouth ask-for-password` command; is there a way to pass the password into this command from the command line? I've tried writing to the process's stdin, but that didn't work. Is there some other way I can do it?


Can I install ubuntu on a Virtualbox image and use it anywhere?

I am wondering if I install ubuntu once on a virtual machine running inside virtualbox, could I then use it as a portable OS and launch it from virtualbox on any machine? Or would I have to match the hardware of the original host? I am just wondering if it would be smarter to do this or get a live CD and just create snapshots as I add more stuff into it. (kind of a pain but I will if need be.) I am new to both VMS and *nix so if is a silly question then pardon my ignorance.


Can I upgrade to a newer Ubuntu version on a Ubuntu-based distribution?

I'm currently running elementary OS Luna, which is based on Ubuntu 12.04. Can I upgrade my installation to have a Ubuntu 13.04 base, but still use elementary OS's desktop environment and applications? Would elementary OS's packages break because they expect the dependency versions in Ubuntu 12.04? Would I be better off installing 13.04, building elementary OS's packages from source, and then reconfiguring all my preferences for everything?


Since Android has malware, does it mean no Unix is immune from malware?

Android has virus: Android.Counterclank, Android.Tonclank (seal info, back- door). Does it prove that FreeBSD, Solaris, Fedora, CentOS, ArchLinux, Ubuntu all is running and having similar virus/trojan/malware, but not in publicly well known? Basically in general linux/unix desktop or server, we do not see because there is no scanner/nor better tools available nor we care by saying Linux/Unix do no thave virus. But Android shout proves it every Linux/Unix has trojan/virus/malware sitting and sleeping somewhere which is stealing business logic, confidentical information, transactions, paswords etc same like Windows?


How does Bash path completion work with sudo?

Tab path completion does not work (at least on Ubuntu and AFAIK Arch) with               sudo mount <whatever>      The iso file I am trying to mount is not in `/etc/fstab`. If I just type               mount <whatever>      the completion works (but of course the command fails as I am not root). Apparently it is `sudo` that breaks it. How can make completion work with sudo? It is surprising that with               sudo umount <whatever>      completion works. How is it achieved? Does it look into `/etc/fstab`? **Solution:** I just put a shell script into `/usr/local/bin` that calls `sudo mount ...` with the arguments passed to it. Completion works when calling this script since there is no `sudo` in the way.


Why does the Linux kernel report "out of disk space" when in reality it is out of i-nodes

A friend of mine who likes programming in the Linux environment, but doesn't know much about the administration of Linux recently ran into a problem where his OS (Ubuntu) was reporting "out of disk space on XXX volume." But when he went to check the volume, there was still 700 GB left. After much time wasted, he was eventually able to figure out that he was out of inodes. (He was storing lots of little incremental updates from a backup system on this volume and burned thru all his inodes.) He asked me why the Linux kernel reported the error message ("out of disk space") instead of properly reporting ("out of inodes"). I didn't know, so I figured I would ask StackExchange. Anyone know why this happens? and why it hasn't been fixed after all these years? (I remember a different friend telling me about this problem in 1995.)


useradd fails on archlinux

testing out archlinux in a vm by following a tutorial on youtube.. all is fine up until the point where i reboot, boot with the hard disk and enter `root` at the login screen. i am trying to add a new user with the useradd function like the guy does in his walkthrough. I enter:               useradd -m -g users -G lp, scanner, audio, video, optical, storage, network, power, games, wheel -s /bin/bash iKlsR       upon entering that i get this error > useradd: group `` does not exist I followed his instructions as closely as possible yet his works and mine doesn't, is the syntax accurate and or there any pitfalls to adding a user this way, im thinking about trying the interactive `adduser` but im interested in what this does and understanding the switches etc.


Restricting D-Bus access to the logged-in user via ConsoleKit or systemd

I need to restrict the client of a D-Bus service to only the user logged into the system locally, via ConsoleKit or systemd. How must I configure or write the D-Bus service to do so?


Running gnome-keyring-daemon in CentOS?

I successfully installed MySQL Workbench in Centos 6.2. When I run MySQL Workbench and try to store a password by clicking "Store in Keychain", I get the following error: > Could not store password: The gnome-keyring-daemon application is not > running. N.B: after clicking "Store in Keychain", I do enter a the MySQL user/password. When I try to run the following `command /usr/bin/gnome-keyring-daemon -d`, I get the following message: > gnome-keyring-daemon: couldn't lookup ssh component setting: Failed to > contact configuration server; > > some possible causes are that you need to enable TCP/IP networking for > ORBit, or you have stale NFS locks due to a system crash. See > http://projects.gnome.org/gconf/ for information. > > (Details - 1: Server ping error: IDL:omg.org/CORBA/COMM_FAILURE:1.0)gnome- > keyring-daemon: > > couldn't lookup pkcs11 component setting: Failed to contact configuration > server; some possible causes are that you need to enable TCP/IP networking > for ORBit, or you have stale NFS locks due to a system crash. See > http://projects.gnome.org/gconf/ for information. > > (Details - 1: Server ping error: IDL:omg.org/CORBA/COMM_FAILURE:1.0) > GNOME_KEYRING_SOCKET=/tmp/keyring-FazjOu/socket SSH_AUTH_SOCK=/tmp/keyring- > FazjOu/socket.ssh GNOME_KEYRING_PID=20933


Copy and Paste between two guests in RHEV and/or VMware ESXi, is possible?

I do have two different setup:   1. setup is with RHEV 3.3 and   2. setup with VMware ESXi Is it possible to copy and paste between the two assigned guests to user, one guest is of Windows 7 and another guest is of `Centos 6.5.` Both this machines are under same user access. I would like to make enable files drag and drop and text copy and paste from clipboard, for both set-ups.Any Help


How can I ignore "zip warning: name not matched" when using zip command with -d option?

I am creating an sh file to run multiple commands in the background. At some line in this file, there is a command to update a zip file like:               zip -d archive.zip file.txt      This file.txt might not be a part of the archive.zip always. When it isn't, the shell script breaks in that line with:               zip warning: name not matched      I want it to continue to the following lines with ignoring non-existence of this file. How can I accomplish this?


How to update tcpdump?

I would like to update `tcpdump` on my computer (CentOS 6.5) which is currently old. I download the zip file from TCPDUMP/LIBPCAP public repository already but I don't know how to update with this file. Do I have to delete `tcpdump` on my computer first? Would you please provide the step for me?


Why does the column command not align columns properly?

In another question I asked on how to hide all .pyc files when using ls, Ignacio suggested the following: ![ls | grep -v '.pyc$' | column](http://i.stack.imgur.com/JuNAV.png) This, as I mentioned above, doesn't work precisely, since the output is occasionally misaligned:               ceasarbautista@hse140:~/Desktop/Statistics/statistics/markov$ ls     README          __init__.pyc        markov.py       matrix2graph.pyc    pathfinder.pyc      priority_dict.pyc   spanning.py     __init__.py     graph.py        matrix2graph.py     pathfinder.py       priority_dict.py    space.py        vector.py     ceasarbautista@hse140:~/Desktop/Statistics/statistics/markov$ ls | grep -v '\.pyc$' | column     README      graph.py        matrix2graph.py priority_dict.py    spanning.py     __init__.py markov.py   pathfinder.py   space.py        vector.py      While I got a satisfactory answer, I'm curious: why does column do this (and can it be fixed to print correctly)?


Search and replace full line in recursive files

I'm using:               grep -n -H -o -R -e textword .      List all file recursively under directory '.' with string 'textword' and show the file, line and only portion matching. I need to remove lines that matched the text using a Linux command.


Imagemagick used to generate PPM's in Linux, PPM's are unreadable

I need to generate PPM's as raw data sources for one program. I have a bunch of png's as Input, which I'm going to convert ppm's. When I try a tool like `mogrify` it generates files, but these are unreadable to any image viewer programs such as GIMP:               mogrify -format ppm *.png      I have installed `netpbm` package. I tried to open some other random PPM's from other places, any image viewer can open and read those files, the problem exists with my own generated files. The files created with `mogrify` seem to have the right size for their resolution and contains bits. In hex file viewer working file header looks like: > P6 640 480 25 Mine generated with Imagemagick: > P7 WIDTH 640 HEIGHT 480 DEPTH 3 MAXVAL 255 TUPLTYPE RGB ENDHD Probably I need to give Imagemagick some other parameters to make correct file format, but what? Or is there another tool which can easily convert png's to ppm's?


pm-utils: No network in suspend scripts?

I'd like to put a script in `/etc/pm/suspend.d/` that needs network access (for a very short time) before allowing the system to suspend. However, even with scripts named "001_something" in `/etc/pm/suspend.d/` and `/usr/lib/pm- utils/sleep.d/` I do not get any network access. It seems this is disabled before the scripts are run. Why is networking disabled? How can I enable it? Also, I am unable to make use of the pm-suspend.log in `/var/log`. It seems the file for the suspend part is overwritten as soon as the system is resumed? The following has been observed in `daemon.log`:               Feb 7 22:09:04 zenbook NetworkManager[3606]: <info> sleep requested (sleeping: no enabled: yes)·     Feb 7 22:09:04 zenbook NetworkManager[3606]: <info> sleeping or disabling...·     Feb 7 22:09:04 zenbook NetworkManager[3606]: <info> (wlan0): now unmanaged·     Feb 7 22:09:04 zenbook NetworkManager[3606]: <info> (wlan0): device state change: activated -> unmanaged (reason 'sleeping') [100 10 37]·     Feb 7 22:09:04 zenbook NetworkManager[3606]: <info> (wlan0): deactivating device (reason 'sleeping') [37]·      I am using Debian Testing with Gnome 3. EDIT: The problem is not related to pm-utils. As far as I know, NetworkManager disables the network (in nm-manager.c:do_sleep_wake). I don't know how to solve this, yet. See NetworkManager: disabled network when sending system to sleep


How to listen to all ports (UDP and TCP) or make them all appear open in Debian

I got an external Debian server. The problem is that my university campus doesn't allow connections to go outside when the port is different than TCP port 22, 80, 443, or UDP port 123. I tested them manually. On my Debian server I would like to listen to all my UDP and TCP ports so I can clearly figure out which TCP and UDP ports my university let through their firewall. Nmap is wonderful on the client side to test that, but what should I do on the server side?