General :: Details On Piping Information Into Command
Feb 15, 2011
I am sure this has been covered before, however I do not know which terms to sue for searching for this, so I will try and explain it.
I have a program that I run at startup to connect me to my work VPN, specifically the Cisco VPN client. When running the program, it prompts me for my username and password. I would like to be able to automate the login process by piping the username and password into the program everytime it starts up (username and password cannot be passed as arguments to the program)
Something like echo username | echo password | vpn_script
is there a way to retrieve the processor model without taking information from bios? I don't know which processor is really mounted. I want to set up the right processor timing, but I don't know the processor type. Every time I change the timing for the processor in BIOS another processor type is determined (I should be an Athlon XP +1500, I think, but I don't know really).
I think with less /proc/cpuinfo the results depends on the timing that is set in bios. So could you tell me how I can find out which processor is really mounted?
Let's say I have a bash script called log.sh. In this script, I want to read in input from a pipe, but I also want to know the command used to pipe input into me. Example:
tail -f /var/log/httpd/error | log.sh
In the shell script, I want to know the command tail -f /var/log/httpd/error.
I want to pipe the output of a command into grep as the search TERM, rather than the text to be searched, like this for example
Code:
cat /var/log/auth.log | grep date "&b &d"
so that I only see the lines in auth.log for the current day...but obviously that line doesn't work.... is there a way to do this with grep, or even another command?
Our simulations generate some big files, I want to save them under /scratch and then ln -s /scratch/$USER/XXX1234/filename to user's project work area. If user runs the ln command after rlogin or rsh to different machine, then he can't see the link from his local machine. How can I add machine information into the ln command, so user can always access the file no matter he rlogin which machine.
Dmidecode is a tool for dumping a computer's DMI (some say SMBIOS ) table contents in a human-readable format. This table contains a description of the system's hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve this information without having to probe for the actual hardware. While this is a good point in terms of report speed and safeness, this also makes the presented information possibly unreliable. The DMI table doesn't only describe what the system is currently made of, it also can report the possible evolutions (such as the fastest supported CPU or the maximal amount of memory supported). SMBIOS stands for System Management BIOS , while DMI stands for Desktop Management Interface. Both standards are tightly related and developed by the DMTF (Desktop Management Task Force). code...
I am using SLES10 and i checked with command crontab -l and when i compared it with the cron.d/daily/monthly/hourly , all they are different. is there any single command that list out all the cronjobs that exist under the system.
I've been searching and haven't had any luck so far so I figured someone here's gotta know the answer to this. I'm troubleshooting why some of my MKV files will play audio on my WDTV and others won't. I'm suspecting it's got something to do with the audio codec inside the MKV. However, I don't know how to view what codecs are being used inside the MKV. Does anyone know of a good program or command I can run to view what's inside of the MKV
I am setting up rsyncrypto to create a backup of my user directory. I read that to exclude directories I need to exclude with find and pipe to rsyncrypto.
I am trying to exclude all .svn directories from getting encrypted and synced.
Here is the find command I'm using. I don't see any .svn directories in the output:
kernel 2.6, slackware 12.0mkisofs 2.01If I do 'ls --help|more' all's well. 'mkisofs --help' outputs its help screen, and I can use Shift+PgUp/PgDn to scroll through it. But I can neither pipe it to more or to less, nor redirect it to some file. more is simply ignored. Less, gets into less but only the last screenful is seen. Redirection, i.e. 'mkisofs --help>john.txt' produces an empty file (size= 0).
I want to attach an analog camera to an old linux computer and directly pipe the /dev/video0 to another computer, where I can use it as a device again (so /dev/video0 should go to /dev/remote0, for example)
(Reason for doing this is that the computer does not have enough power to encode the video)
Is that possible? I've seen people can pipe the data directly from the device over ssh into mplayer, but I need to have some sort of reference point for Zoneminder.
How would you make NIS user information override local user information on client systems? This is what I think is right? Add nis on the passwd registration file on the second line Is this correct?
How do I get the details of the last 10 or 5 mount times for my linux system. Which also includes the times it was mounted from a foreign system running in ram like puppy linux or by another OS on the same hard disk.
When I do System > Applications > Update System, it brings up a list of updates, and can tell me what each update is meant to fix (i.e. "fixes a bug in the flux capacitor so time travel works again (CVE-01234)"). How do I get similar info from the command line- I can't get it through yum, can I?
I'm sure this answer is out there but I cannot find it. I thought there was a command you could put in the terminal to find out what version of Fedora you are running and also tell which architecture (either 32 bit or 64 bit) it is. Does anyone know what that command is?
I have installed 2 fc cards .I have attached FT-SAn to these cards now when i see miltipath -ll output , it shows some path for the multipath can you bfief from where these paths are taking the value . significance of each digit
I dont have under system->admin networking, but i do have netwroking tools (I have the latest version of ubuntu) and I am wondering - what command can i type in to the terminal to see the dns information? also can I install "network" for ubuntu?
I'm trying to find a command or program to show what files and folders are taking up the most space on the hard drive, much like tree size view on windows, is there and equivalent on linux?
I was having trouble getting X.Org to work with the video card in a recently acquired laptop, so I decided to try to probe around the configuration of a Linux Live CD to figure out how to set up my kernel. I chose the Sabayon 5.0 Live DVD because it was the only one that I could find that was the same or newer than the 2.6.32 kernel I have installed on the laptop right now. Of course, the DVD booted right into GNOME without issue, unlike the hangs and crashes that I had been getting. So, I want to figure out what kernel driver this Live DVD is currently using, but I don't know how to. hwinfo doesn't shed any light on the matter, and lspci -vnn doesn't list a driver for my video device, though both methods correctly identify that I have an Intel 855GM video processor. How can I find out this information?
I installed webmin, and I tried to access it with my account (not root, but able to sudo) and I always got login failed.Now I have Access Denied even to my login page for too many tries. What should I do?
The following are the two tex input files written in vi and compiled with pdflatex. In the first case the document details (author, date etc) are displayed as desired but are omitted in the second case. The only difference is the use of maketitle.
Case 1: documentclass{article} author{Name} date{} itle{Title} Begin{document} maketitle Text to be inputted end{document}
Case 2: documentclass{article} author{Name} date{} itle{Title} Begin{document} Text to be inputted end{document}
I have a linux system which has a NAND flash. The compressed kernel is flashed into the NAND flash. On boot up, the kernel is uncompressed, copied to RAM and runs from RAM. Is it possible for me to read the kernel information from NAND flash such as size, start and end location and version?
I have been looking for this in the net, but did not find any answers so far...
I have tried the following: The compressed kernel lies in the 4MB partition of the flash. So I tried: dd if=/dev/mtdblock1 of=zImage But this copies the complete 4MB partition. I need to copy only the zImage. So I need to know its size.
I'm trying to write a program which would get information from a webpage and display the information on my desktop sort of like a widget. I kind of remember there being something like this already made, but for the life of me I can't remember what it's calledDoes anyone know?
I have my .procmailrc file set up to pipe mail to a simple php script I've written. The only thing the script does at this point is echo back a "hello" message. However, procmail does not execute the script properly.