Ubuntu :: Possible To Use Piped Command As Opposed To An All Out Complex Method
Dec 1, 2010
I would like to keep this simple and if possible use a piped command as opposed to an all out complex method.I have a script that does many things for me, and one of them builds a basic simple system report (I know about lshw, but this is for me to learn as well as be functional)
I would like to add another pipe to remove the"model name:" portion.I do not really want to use the store in a variable first solutions if I can help it.
View 7 Replies
ADVERTISEMENT
Jun 18, 2010
Code: cmd='date | wc'
$cmd If this script is executed, an error is generated. The reason written was that "The execution fails because the pipe is not expanded and is passed to date as an argument".What is meant by expansion of pipe. When we execute date | wc on the command line, it goes fine.then | is not treated as an argument. Why?
View 4 Replies
View Related
Mar 5, 2010
When i pipe commands through 'less' in console, i get a load of garbage mixed into the results, and no colors either. Mainly the letters 'Esc' printed a couple of times on each line.
I had been messing about with my bash config files but i can't see anything in there to affect this. If I pipe through 'more' there is no problem, only 'less'.
View 11 Replies
View Related
Feb 3, 2010
I'm not sure how to explain my situation. I would like to download the file <https://www.vmware.com/tryvmware/p/activate.php?p=free-esxi&lp=1&ext=1&a=DOWNLOAD_FILE&baseurl=http://download2.vmware.com/software/vi/&filename=VMware-VMvisor-Installer-4.0.0.Update01-208167.x86_64.iso> via the command line. I've tried a few different methods with wget, the best I get is an index.php file. I'm not at all familiar with php but a search for "wget php" yielded nothing helpful.
View 3 Replies
View Related
Nov 19, 2010
I am building an android, from the source using make command. I want to achieve simple logging while this make is happening.
Aim:
I want to look/log for internal system calls that are being made after i do 'make' command in bash terminal. So that after the make is done, i can look and study the internal method/file calls made while make was happening. In this way i will come to know how the actual building process works.
View 1 Replies
View Related
Jan 15, 2010
I really like that in Ubuntu when you type in a command that's not on the system you get a message saying the package that provides that command. Unfortunately it also slows down my system, so I would like a way to trigger this manually. Something like search-command command-I-dont-have
Is there any way to do this? I'm using Ubuntu 9.04 under andLinux but would also like to use this on a regular Ubuntu 9.04 install.
View 3 Replies
View Related
Apr 23, 2011
I'm trying to backup my old PC games so that I can finally banish their CDs to the attic once and for all. I've just been using the DD command to grab iso's of my games so far, while keeping their keys in a text file (see the DD command below). However, I just hit my C&C collection and I'm having some problems with some of the newer games like Renegade and Yuri's Revenge. I think they must be copy protected or something. 4 of my last discs have stopped copying at exactly 1.7MB (3 seperate DVD drives, 2 IDE, 1 USB enclosed). Can you guys think of anything else that will cause DD to fail at this location? Any ideas? I'd prefer it to be a command line option, as I'm trying to make things go as quickly as possible. Here's the command I've been using. code...
View 1 Replies
View Related
Jan 15, 2010
is it possible to stream a window from X, as opposed to forwarding it over SSH? I've used X-forwarding before so that I could ssh into another computer and open up a graphical program and have it show up on mine. But as far as I know, that window only opens on your computer, not on the computer the program is actually running on. Is it possible for me to open a window on my computer, and to sort of X stream it to another computer that has X so they can watch what I'm doing in that window?
View 1 Replies
View Related
Jun 1, 2011
Is there a simple way to save a video that appears in the /tmp directory as a pipe instead of a video file format? I was watching some of the old educational films on fluid dynamics from t the only evidence I see of a fileaSL_PIPE_500_SingleOfficeIPC_ff7ed09f7cfaad13bfa22 2a40c3fd37
View 2 Replies
View Related
Jan 4, 2010
I'm trying to download a file and extract it in one line, but the extracted file is owned by me instead of root even though I'm using sudo:
Code:
sudo sh -c 'wget [URL]'
If I don't try to extract the file, it is owned by root as I expected:
Code:
sudo sh -c 'wget [URL]'
View 1 Replies
View Related
Aug 3, 2010
I am doing this project for our school. Basically we want to pipe all incoming emails to a script which filters out certain messages (not only spam but duplicates, large messages, etc). If they fail certain criteria, the script simply does nothing.If they pass , then the script should pass the entire message (headers and body) back on to qmail to send. The piping part is not a problem, but I am stuck with the next part. Is there a way to pass the headers and body back to qmail for it to process and send, as if it received it the first time?Some details:A catchall email account is created via Plesk control panel on linux (centos).THe .qmail file in /var/qmail/mailnames/domain.com/catchall/ is edited to include the line:-|/path/to/pipe/handler.phpThe handler.php file simply reads the entire message (headers and body) and they are then parsed and analysed.
View 2 Replies
View Related
Nov 4, 2010
Is it possible to set up Ubuntu 10.10 where one click will open a document as opposed to double clicking?
View 2 Replies
View Related
May 5, 2013
I'm piping stdout from mplayer to awk, but the output stutters.
Code: Select allmplayer audiofile.m4a 2>&1 | awk -vRS="
" '$1 ~ /A:/ {print $0; fflush();}'
Instead of a steady output of lines to the terminal, output only occurs after a few seconds, between 6 or 12. This happens whether the input is from mplayer or avconv/ffmpeg. This never used to happen (a few years ago) so I wondered whether an awk update caused this to happen.
View 6 Replies
View Related
Nov 6, 2010
Code: stuart@stuart:~/$cat showthread.php.html | grep -o [URL][^"< ]*" | uniq | head -n3 | plowdown - cannot stat '-': No such file or directory Code: stuart@stuart:~/$ awk NR==$x Musiclist.txt | cut -d/ -f6 | basename $1 .mp3 .mp3 Here's some system info on the bash i'm using:
[Code]...
View 13 Replies
View Related
Jun 16, 2010
I tried shutting down from terminal as opposed to KMenu and the shutdown hung without completing. I did a 'hard' shutdown mechanically.The command I used was: # shutdown -a -t 5secs now
Is there a way to correct this?
Desktop Running Gear
i-386 Processor
2.6GHz/512MB RAM/160GB HDD
HS Cable-Modem: (Motorola SURFBoard SB5101) direct to ISP (no router)
[Code].....
View 4 Replies
View Related
Jul 1, 2011
Under Gnome on 10.10, does anybody know how to make the Rubbish Bin open when one double-clicks the icon as opposed to single-click?
View 7 Replies
View Related
Jul 27, 2011
Self learner developer since about 2 years, I'm trying to understand deeper how to design a database in the best and most efficient way possible.Reading about UML design, I've found this: Do not automatically add ID numbers(surrogate keys) or substitute keys to a table until you are sure that:
-There is at least one candidate key (before the surrogate is added),
-the table is a parent in at least one association, and
-there is no candidate key small enough for its values to be copied many times into the child table.
Until then, I've always did this (I mean using ID) to identify my rows.So my questions are:
1. Why should we avoid using ID to identify rows?
2. Candidate keys add some weight to our database, and this can huge if we have millions of records, so why should we use these over surrogate keys?
View 1 Replies
View Related
Sep 23, 2010
I have a simple log file which is very messy and I need it to be neat. The file contains log headers but are all jumbled up together thereforeI need to sort the log files according to the log headers. There are no static number of lines that means that there is no fix number of lines for the each header of the text file. And I am using AWK to sort out the headers.The Log files goes something like this:
Code:
Car LogFile Header
<text>
[code]...
View 1 Replies
View Related
Sep 24, 2010
I have a simple log file which is very messy and I need it to be neat. The file contains log headers but are all jumbled up together therefore I need to sort the log files according to the log headers. There are no static number of lines that means that there is no fix number of lines for the each header of the text file. And I am using AWK to sort out the headers.
The Log files goes something like this:
Code:
Car LogFile Header
<text>
<text>
[Code]....
View 1 Replies
View Related
Sep 16, 2010
We're going to be doing a rather large server deployment, and using the provisioning system we have in place there is no current way to just "copy" a file over to the servers. All files/scripts have to be run from the provisioning server.Due to network constraints, the provisioning system can't run a script we need to run (requires certain network assets to complete, but as soon as we modify the network settingshe provisioning system loses access to the server and can't run the script). So,our network configuration script to create the other script on the server in /root when it runs.My original method was to do something along the lines of:
Code:
#network configuration statements here
....
[code]...
View 2 Replies
View Related
Nov 2, 2010
I've got a fairly complex bit of code (a for loop within a for loop) which I'm trying to execute remotely, however because of the special characters this exits without making the connection.Usually I'd do:ssh root@ipaddress "for i in `cat /etc/hosts | awk '{print $2}'`; do ping $i; done;"But given the complexity of my code this usual tactic doesn't work
View 3 Replies
View Related
May 19, 2011
I need to replace a line in the lvm.conf file from: filter = [ "r|/dev/.*/by-path/.*|", "r|/dev/.*/by-id/.*|", "a/.*/" ] to: filter = [ "a|/dev/cciss/c0d0.*|", "a|/dev/disk/by-id/.*|", "r|.*|" ] And I was hoping there was a way to use sed or awk to do this in a script (as I need to repeat this on several machines).
All of the examples I've found don't see to work with all of the special characters in the line that I need to replace. Then I need to add a line after the above edit like this: types = [ "device-mapper", 253 ]
View 3 Replies
View Related
Jan 26, 2010
My network looks like the following:
WAN (cable)
|
|
[code]...
View 6 Replies
View Related
May 24, 2010
I am trying to write a bash script to delete a file where I know the first part of the name, but it has spaces in it. The second part of the file name is a random set of characters. I was hoping to use a wildcard for this, but I keep getting a error massage saying file or directory does not exist. This is a simplified form of my script:
Code:
MYFILE=This is my file
rm "$MYFILE*"
The file may be something like "This is my file.123abc456.suffix"
View 14 Replies
View Related
Jul 11, 2010
I've tried a new Ubuntu 10.04 and Fedora 13, both o them have gnome >= 2.30. In them, alsamixer says default sound device have only master volume slider. When I changed device to "Intel HDA ..." it shows all the sliders (Master, PCM and other). I saw changes in the default master volume causes changes in both, Master and PCM scales. Is there anyone know how to make gnome sound volume hotkeys leave the PCM slider alone? I need it for my personal tasks.
View 3 Replies
View Related
Feb 16, 2010
Here is my situation:I have a series of .plt files that are geared for a device that has it's xy origin at the lower left of the paper however some devices use the center of the paper as it's origin in a piped shell script how can I convert this file to a center origin plot file?Here are some knowns: the existing file always Lower Left 0.0 the existing file max xy is the page upper right x.x the desired output file must have it's 0.0 at the exact center of page (page size will vary). Ideas: Based on the sample files included maybe use PU and PD as the triggers for inputs to be calculated as any other commands have nothing to do with coordinates.
View 14 Replies
View Related
Mar 5, 2011
I am having trouble with computers communicating on the wireless lan. However, if I ssh into the wireless access point and then ssh into another computer on the wlan, that works fine. The draw backs to that is I am restricted to only ssh and without X forwarding. So what I would like to do is set up ssh port forwarding so that computer2 with vnc server 5900 on the lan will be accessible through 40000 on mycomputer using the wireless router's ssh as the go-between with ssh port forwarding. How can I accomplish that? Every time I read about this, I think I understand it, and but then I must have done something wrong because it's not working the way I thought. I have successfully done ssh port forwarding in the past without using a third computer as a go between. Both the wlan access point/router and computer2 are running an ssh server.
View 1 Replies
View Related
Jan 26, 2016
I would like to update my network setup.
Today, I have an ADSL box which is my gateway to internet (192.168.0.1).
I have a Raspberry pi (RPI) which I use as a dhcp & dns server (192.168.0.2).
Recently my mobile phone operator installed a 4G antenna beside my home, and the bandwidth and latency are much better with my mobile phone than with my internet provider (ADSL).
I would like to install a wifi dongle on my RPI (I would get wlan0 & eth0 interfaces)
When RPI detect my shared phone connection (tethering) I would like RPI to automatically route internet:
- from authorized devices on my network to my mobile connexion (wlan0 -> mobile phone).
- from other devices to the standard ADSL internet (eth0 -> ADSL box).
I don't want any device to use the shared 4G connexion, best would be authorized devices to be selected by MAC address. How I should properly setup such a network ?
View 2 Replies
View Related
May 9, 2011
How to change the complex number like -123.45e67 in to real number.
with command of awk print
View 1 Replies
View Related
Jun 10, 2009
I quit using Fedora when FC4 came out, but I decided to switch back now that F11 has come out. I'm liking everything so far, though it is different from what I became used to (Ubuntu). My main question so far has to do with language support, and I cannot seem to find an answer anywhere for this. I need to have language support for several languages (including support to enter complex characters) for all applications for which it they are available. How do I install all the language files at once for, say, Korean, rather than installing each library one by one?
View 6 Replies
View Related