General :: Capturing From Line One Input?
Apr 23, 2011On my first card of ALSA (alsamixer -c 0) I would need to record the Line only.
View 1 RepliesOn my first card of ALSA (alsamixer -c 0) I would need to record the Line only.
View 1 RepliesI am trying to write a script that takes an input file ($FileName) and an intermediate file ($FileName.info) and removes lines from $FileName if the value in $2 of $FileName.info is <75.
I can't figure out how to feed only one line of the .info file to the if statement at a time so that it will perceive it as an integer instead of a list.
The error I am getting now is ./script.sh: line 6: [: : integer expression expected
Sample input $FileName
Code:
Code:
Code:
Script so far:
Code:
I installed Lucid. I used to have Ubuntu 9.10 and to connect my iPod to my laptop's speakers. There was an option in 9.10 in the Sound Options to change the Mic Input into a Line Input. But now unfortunately I can't find it in Lucid have only 2 audio ports in the laptop: Headphone port, Mic port.
View 9 Replies View RelatedWhen Linux ask for my password in command line,my keyboard becomes unresponsive just for that moment or let me put it this way,until i need to write my password my keyboard is unresponsive,but for all other things is fine.or for example,i can input my password when i have a graphic interface but i can't with command line or i can't login to my computer from command lineexcuse me if my question is doll,i moved from windows to ubuntu just lastweek,( & i am flying high in sky with ubuntu & digging a very deep hole for windows too!!.)
View 2 Replies View RelatedI need to create a single line of output from multiple and variable lines of input in a Linux bash shell script.
My input file looks like this:
Where there may be any number of umsecondaryphonenumber lines; if there is not a umsecondaryphonenumber line for a telephonenumber, I don't want to write any output.
So, the output file should look like:
The script I have so far is:
My question is - how do print each of the elements of an array in one record - i.e. what do I put in place of howdoiprintarray?
I have a file with two fields of numbers that I want to use as input for another program.
Code:
The above code does not work, as I think it would take the whole first and second fields as the input for one particular instance of the program 'inputbashangle'. What I want is to get the first two numbers from the first line of the file 'outfailtest', execute 'inputbashangle' with them, then move on to the first two numbers of the second line for all the lines of 'outfailtest'.
turn "Mic Front Input" option on for alsamixer from cmd line?
View 5 Replies View RelatedI've written my script so that it reads in the variables $1 $2 $3 $3....$12I have an input file as follows
word1 1 1 2 3 4 5
word2 1 1 2 3 4 5 6
word3 1 1 2 3 4
[code]...
I'm writing a program which now accepts user input:
Code:
echo "Enter a date in the format YYYY MM DD hh mm ss."
read gregyr gregmo gregdy greghr gregmn gregsc This lets the user input a date and time, such as 2011 06 21 15 12 45, and have each number assigned to their corresponding variable. Later in the program, these variables are put into an equation, and then the terminal spits out the answer. Now I have to have the program read all of the lines from a text file, which is in this format, assign the variables.
I want to capture PID of a program and kill it using the PID if the program is been executing beyond 5 seconds.The problem I'm facing is I have another copy of the same program running under different shell script, and the above code is killing both the process. How do I specifically kill the program which has started under the current running shell script.
View 2 Replies View RelatedI am capturing the response of three URLs which are in file named urls.txt using following command and write response in output.txt file.
####Code############
wget -i urls.txt -q -O - | tee output.txt
###########End of code
Now i am finding the case where url is not responding and that output is not available to me in the file and on console i am getting "Could not connect to host".
Now I want to modify my urls.txt to have two fields:
Name and URL
Example:
URL1 | http://10.0.0.2/xsc/abc
URL2 | http://10.0.0.1/lkj/csv
URL3 | http://10.0.0.5/sdf/plk
I want to execute each url and print there response against each name
Example:
URL1 : CONNECTED
URL2 : NOT CONNECTED
URL3 : NOT CONNECTED
I wanted to take an audio feed from a stereo amplifier into my HP Pavilion DV6 laptop, in order to digitally record some old vinyl.
In the Sound Preferences tab, I seemed to be able to record easily from the internal mic, but there seemed to be no easy way to switch the preferences to enable recording from the Line In socket on the laptop.
We tried muting the mic, this only caused the system to record nothing. We also tried all the various available options in "the Hardware Profiles" tab, "Settings for the available device", but no the laptop seemed to be getting no "line in" input with whatever profile we tried.
On Mac, it was as simple as switching the input sound preferences from "internal mic" to "line in".
It has been happening to me since I started to use this laptop from the company for a linux test bed. Several times a day, when I do something from the command line, for example running an application connecting to another host on the internet, etc,it comes to a freeze and does not come out of it. I can not do anything else than a forced reboot from the power button, because the keyboard and the mouse do not respond. This work laptop is a lenovo W500, running on ubuntu jaunty, release 9.04. I have not encountered this problem before with my personal laptop though. My person laptop is a lenovo X61s, running on ubuntu karmic, release 9.10Should I reinstall the work laptop with some other version of ubuntu? Could it be some hardware problem ? What tools should I use to diagnose
View 2 Replies View RelatedI want to compare the quality of a sound file (voice) before and after its transmission via a softphone (sjphone in my case). For this, i need to redirect the sound played, to the sound input (microphone or line-in).
View 1 Replies View RelatedI have a file which contains a table
row1 ✔ no ✔ no
row2 no ✔ ✔ no
... so on
I want to prefix the number of ✔ to corresponding row If I use the command :.s/✔//gn I get output written like '2 matches on 1 line' How can I extract the '2 matches' in above case ?
I have been searching for an answer through most of the recent posts about sound issues but have not been able to find a solution. I am currently unable to capture sound from the "Line" input on my sound card. I do have sound and is working correctly for all applications and I do have P/A disabled (I'm not a huge fan of the sound quality with P/A enabled). I have checked and re-checked many settings but to no avail have not been able to capture sound. I'm sure I may be missing something or have not done something in order for this to work. I was using openSUSE 11.4 on a different pc and had no problems, unfortunately this is a different pc with a different sound card which is on-board so I am not entirely familiar with it yet.
It is a C-media CMI9880 which shows up as a Intel HDA (ICH6) and appears to be configured correctly.
How do i take a single line of input from the user in a shell script?
View 3 Replies View RelatedI want local programmatic access to ssh output in Mac Terminal. First, I tried redirecting the output of each command to a file. The file was perfect, but of course it was on the remote server, and an sftp for each command output seemed a little.. Next, I tried to Applescript Terminal, but it only gives access to the currently visible text in a tab (i.e. if half the output has already scrolled out of sight, it doesn't get returned - useless).
Last, I tried piping ssh to tee (e.g. ssh user@host | tee output.txt). This almost worked. I have the output in a local file, but there are a lot of unwanted characters mixed in. For example, every time I hit backspace, there's a ^H in the file. There's also text like "[0m[K" which is harder to get rid of.
I'd like to make an indirect control for Emacs (in Ubuntu Linux) so that I can swipe some text in an xterm with the cursor, cutting it into the X cut buffer, then run a macro in Emacs to parse the cut buffer text to look for text saying "line XXXX" where X is all digits, then go to that line in the current Emacs buffer. I think this is possible by using emacsclient to get emacs to run a macro, then the macro parsing the cut buffer, then issuing a goto-line command to the number that's been parsed. My problem is I don't know how to write the emacs script to read the X cut buffer and parse it.. I've been going through cookbook examples but none seem to fit.
My goal is to ease development. When I have an error/information/status message printed in an xterm, I want to swipe the error message which says something like "syntax error on line 2776" then press a keyboard shortcut which Ubuntu will interpret to launch emacsclient, which causes my already-open Emacs to grab that text, parse it, and go to the line number I just swiped. Only this last step of parsing is the hard part. (Yes, I know you can run a shell INSIDE of emacs, but this is doesn't fit my workflow). How would I make emacs look at that X cut buffer and parse out the line number and issue the "goto-line" command to the current buffer?
I'm using recordmydesktop for screencasts and currently use pavucontrol to select the monitor as the input source, as shown in many guides across the Internet, but I can't find anything on how to do it from the command line. How can I select a monitor as the audio input source for recordmydesktop from the command line?
View 1 Replies View RelatedI have an executable with input options, like so:
Code:
./executable -n 42 -s 42
I've added gcov to the makefiles (compiling with --coverage, -fprofile-arcs, and -ftest-coverage, and linking with -lgcov). It builds fine and creates executable.gcno.
When I try to run gcov, gcov things the options belong to it:
Code:
$ gcov ./executable -n 42 -s 42
gcov: invalid option -- 's'
Usage: gcov [OPTION]... SOURCEFILE...
When I use quotes this happens:
Code:
$ gcov './executable -n 42 -s 42'
executable -n 42 -s 42.gcno:cannot open graph file
The command line options must remain. How can I get gcov to generate the same .gcno file it later looks for?
I'm just wondering if there is a video capturing program that can, at the least record what is on my computer screen (including what is on Wine) and at the most capture what is on my webcam as well.
View 2 Replies View RelatedMinicom was running fine two days ago capturing data from a gage device via a serial cable. Yesterday, users of the data started complaining that they were not receiving any data.
The minicom status line reads offline. Is this part of the problem or is this normal (I never really noticed it before.) All settings on the gage device match the minicom settings.
I need user to input a password through command line in Windows cmd prompt. Is there a way to encrypt the input (such as put it into ......) when user is typing ?
View 2 Replies View Relatedbasically i have to create a simple program with will continually read input from the user until they enter a blank linei know how to read in certain input but not sure how to get it continually in a loop
View 2 Replies View RelatedHow to create cron tab when DSL line down set automatically restart the network service while DSL line up?
View 3 Replies View RelatedAfter running the following command, I get:
[root@yukiko /]# find / -iname .bashrc
/home/clamav/.bashrc
/home/vpopmail/.bashrc
/etc/skel/.bashrc
/root/.bashrc
But I would like to have a command that prints a specific line by supplying the command with the line number, for example:
[root@yukiko /]# find / -iname .bashrc | getline(2)
/home/vpopmail/.bashrc
Is there such a command on CentOS?
I have several files with many lines something like this:
I'm trying to write a script that will count the number of characters per line that doesn't contain a ">" symbol and give me an average of those values. I have most of the script together but I can't figure out how to connect some of the steps.
Code:
I've written a script to parse a file and print each line that ends with matching pattern, if the next line is blank. The pattern lines are the result of md5sum $i|sed 's/path///g' so that only md5 and filename appear. Here's what I'm using.
Quote:
for fline in `sed -n '/.*.ext$/p' file1`
do
if [ "`sed -n -e '/'"$fline"'/ {n; p;}' file1`" == "" ]
then
echo ""$fline" has no info" >>file2
fi
done
[Code]....
whats the different between Chain RH-Firewall-1-INPUT (2 references) and Chain INPUT (policy ACCEPT)?
View 1 Replies View Related