Ubuntu :: Piping The Output Of The Shell To Notify-osd?

Apr 30, 2010

how would you go about piping the output of the shell to notify-osd?

View 5 Replies


ADVERTISEMENT

General :: Piping Output Of List To Cp?

May 16, 2011

I have the following code

Code:

ls ~/ | grep ^[[:lower:]]

and would like to take the result of this output and use this as the basis for a cp command to move these files to another folder.

View 3 Replies View Related

Programming :: Piping Cat Output To Variable?

Jan 10, 2010

New to ubuntu and shell scripting in general... currently I stored some data into a text file. Right now, I would like to output the data from the text file and store it into a variable. Here's what I have so far:

READ_FILE=$(cat $FILE_NAME)

This definitely works and READ_FILE has the necessary data. However, this command will trigger an output to std output and I will see data on the screen, which is not what I want. I tried:

cat $FILE_NAME | $READ_FILE

and various other variants of this. It does not output to std output but neither does anything gets stored into $READ_FILE. I tried:

cat $FILE_NAME >> $READ_FILE

and it arrived at an error of "ambiguous redirect".

View 12 Replies View Related

Software :: Alternative To Cat For Piping Dvb Output To File?

May 12, 2010

I am looking for an alternative to cat for streaming the output (ATSC) of a dvb card to a file. cat works fine for a bit but there is some internal variable that reaches a size limit and stops it. As evident by the c error "variable has reached size limit" (sorry for the paraphrase I do not have the error in front of me.) That is ok, a co worker who knows c told me the best thing to do is to find some other utility to do this. cat /dev/dvb/adapter0 > test.mpg is what I am looking to replace. how to pipe this into some sort of compression utility.

View 4 Replies View Related

Ubuntu :: Piping Command Output Into Grep As Search Term?

Nov 11, 2010

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?

View 4 Replies View Related

Ubuntu :: Building A Dictionary With A Bash Script - Piping The Output To A File

Sep 5, 2010

i'm building a dictionary with a bash script. it works perfect except i'd prefer something faster. btw i'm just piping the output to a file.

[Code]...

View 1 Replies View Related

Ubuntu :: Emacs -- Run Shell Command W/o Output?

Jul 12, 2011

I write LaTeX in Emacs and then run a shell script to process the LaTeX code. I used to run a subshell buffer with M-x shell and then execute the script from within there, but this results in a lot of switching between buffers, which seems unnecessary. Then, I found out about executing shell commands with M-! cmd RET, as described here:[URL]The problem with this is that the output from the script splits my screen. It's a nuisance, and I would like to run the script without any output. I've tried appending > /dev/null to the command, but it doesn't work.For example, when from within Emacs I enter M-! followed by

Code:
sh make.sh > /dev/null
it splits my screen so that one portion displays output from the make.sh script. I want it to run silently, and leave my Emacs buffers alone

View 3 Replies View Related

Ubuntu :: Shell Command Output Not Showing Immediately?

Jan 18, 2011

This is an extremely weird issue that I can't find any help with on Google. It is minor but extremely annoying.

When I type in a linux command in the terminal, (e.g. "ls -la"), and then press enter, the cursor goes to the next line and just sits there, as if its processing some long command.

If I press enter again, I see the ls output as well as my prompt twice. It's like the terminal window isn't auto-scrolling, but I've also seen this happen when there wasnt even enough text in the console screen to warrant a scrollbar. Has anyone seen this before and know what I need to do? I hope what I'm asking about makes sense.

View 3 Replies View Related

General :: Can't See The Output Shell In Child

Feb 4, 2010

I have following script.

Code:

#!/bin/bash
export VAR="shell"
echo " $VAR in parent "
bash
echo "shell in child "

If i execute this script, the output is just

Code:

shell in parent

Why can't I see the output shell in child ?

View 2 Replies View Related

Programming :: Redirect Output To Files Using Shell?

May 21, 2011

I have a huge database of students, I would like extract these data and write to individual file for each students.

I am running a loop in shell program (.sh file), the output of each run in the loop need to redirected to a file with variable name.

I tried the following line, but it did not work, where BodyMsg is the data and Rollno is the students roll number.

echo $BodyMsg > $RolNo".html"

View 5 Replies View Related

Programming :: Modify Output Of Shell Script

Dec 3, 2010

I'm running RHEL5.5 and nagios 3.2.0. The real question deals with how to change the printed output so nagios will work with it.I have made a script that will calculate network throughput on interfaces. The script is going through and finding all interfaces (eth, bond, lan) and doing the math to calculate throughput.The output is mainly for nagios to report and trend the values. As nagios wants to see nothing but perf data after the '|' character, I somehow need to have only one '|' character for all of the output.

View 2 Replies View Related

General :: Pipe Output Of Shell Command Into A New Buffer In Vim?

Jun 29, 2010

How can I pipe the output of a shell command into a new buffer in Vim? The following obviously wouldn't work, but you can see what I'm getting at:

:!echo % | :newtab

View 2 Replies View Related

General :: Copy / Paste Output From Shell (not Terminal)?

Jul 15, 2010

I often have issues starting my window manager--xfce. My computer misbehaves in one of 3 ways, one of which is to fail to open X, but generate several screens of info. I want to paste that info to this site, but since I'm in the shell, not the terminal (please correct my vocabulary if it's wrong here), I don't know how to copy and paste the output, since right-clicking doesn't give me a menu. Even if I could copy I'm not sure the information would be accessible in X. Are there any other options?

View 13 Replies View Related

General :: Storing A Variable In A Shell Script After Awk Output?

Feb 8, 2010

On command line I have no problem storing a variable e.g

Code:

:~/bin$ process=`ps -ef | awk ' $8 == "idesk" { print $2 }'`
:~/bin$ echo $process
26736
:~/bin$

When I try to incorporate this into a shell script I get a blank.

Code:

:~/bin$ cat process_idesk
#!/bin/bash
process=`ps -ef | awk ' $8 == "idesk" { print $2 }'`

[code]....

The process_idesk script has been chmoded to be executable by the user. I'm sure there must be a silly omission on my behalf.

View 3 Replies View Related

Programming :: Shell Script - Redirect Output To File

Sep 6, 2010

I did a select on my db and now I need that this if consult return true for me salve the columns information in file. How I do this in Shell?!

View 3 Replies View Related

General :: Displaying Graphical Output From PAM Called Shell Script

Nov 19, 2009

Before I begin I would like to say that while I am not a Linix newbie, I am not a guru or even a regular user so don't assume I have anything more than general Linux knowledge. I am carrying out research involving virtualization and Single Sign On technologies and I need to display a Xen based virtual machine to the desktop before the user is logged in. This is for a demonstration system and I am trying to find a solution that involves the least amount of system modification possible.I found a PAM module that allows for the invocation of arbitrary shell scripts which would allow me to start and display the virtual machine in question, but when trying to run the virt viewer (or any process with graphical output) I am informed that the display cannot be found. Explicitly setting the DISPLAY env to :0 before running the command has no effect.

This is where my Linux knowledge runs out. I know that there has to be some way to connect to the X session being used by the greeter, I just don't know what that method involves. The shell script is running with root privileges, so it can access whatever "X credentials" are stored locally.

I will be thankful for any assistance this forum might be able to provide, but please do not suggest alternatives to displaying a VM for my SSO needs, and please avoid any solution that involves having to write my own custom greeter. If there is absolutely no way to accomplish what I am trying to do without greeter modifications definitely tell me, but I am a security researcher, not a Linux developer so I am looking for the easiest solution to implement, even if that solution is a gross hack.

View 1 Replies View Related

General :: How To Send Colored Output Of Shell Script As Email

Feb 24, 2011

Regarding this task, I am able to print colored output in my putty sessions using tput or ASCI codes but whenever I tried to send that output through mail command to my outlook maillox, It always goes without colored. I need to produce those coloured output of the scripts as it is in mail.

View 1 Replies View Related

Programming :: Shell Script Ssh : Eliminate Login Process Output?

Jun 1, 2009

I use tcl-expect script to ssh to the server. How can I eliminate the first 2 lines if using system(./script.sh) to execute it, as the default output will be shown on shell and the first 2 lines are included.

Essentially I just want to have the "ps" result, not the login process. code...

View 1 Replies View Related

General :: Redirect Output Of A Command To Another File Inside Shell Script?

Aug 26, 2010

I am writing a script in which I am using AWK to append to a line in a file and save the file. The command I am using is:

Code:
awk '{s=$0; if ( NR==4 ){s=s ":/usr/java/jdk1.6.0_19/bin" } print s;}' $appName > $appName.new

[code]...

View 4 Replies View Related

General :: Write Expdp Output In A Text File Using A Shell Script ?

Feb 7, 2011

I want to write expdp output in a text file using a shell script

If i write like below:

It will write whatever is there in log file to text file

But, sometimes export fails with out start taking export (without generating log file) because of job already exists error. such times, we dont know about that error until we check manually... so i wrote like below:

But still it is not writing anything in to text file using above stmt...

View 1 Replies View Related

Programming :: Creating Array From Command Output (Bash Shell Script)

Jan 26, 2011

I have a command that outputs n lines of text, and I want to place each line into an array element, but I can't seem to get the syntax correct

So my command is this:
cat $configfile | sed -n '/cluster:'$clustername'/,/cluster/ p' | awk /host/

Which produces many lines depending on the value of $clustername. I'd like to get each line as elements of an array.

View 5 Replies View Related

Debian Multimedia :: Conky Execp / Execpi To Parse Output Of Scroll Variable Generated From Shell Or PHP Scripts

Sep 11, 2015

I am having a hard time getting conky execp/execpi to correctly parse output of the scroll variable generated from shell or PHP scripts.

Code: Select allDebian 8.0
Xfce 4.10
Conky 1.9.0-6

This is a simplified minimal conky configuration file used to show the same problem:

Code: Select allalignment bottom_middle
background no
border_width 1
default_color white
default_outline_color white
default_shade_color white
double_buffer yes

[Code] ....

Here is the output I'm getting:

Code: Select all          ABC       /*doesn't scroll, UNEXPECTED, shows 10 spaces before ABC*/
          ABC       --||--
abcdefghijklmnopABC /*doesn't scroll, WORKS AS EXPECTED as scroll length is 25 which is longer than text "abcdefghijklmnop" */
abcdefghijklmnopABC --||--
abcdefghijklmnopABC /*WORKS, everything before ABC scrolls 5 characters at a time*/

View 0 Replies View Related

General :: Piping Find To Rsyncrypto?

Aug 21, 2010

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:

find ~/Documents -type d ( -name .svn ) -prune -o -print

But when I pipe the output to rsyncrypto I see lots of .svn directories getting encrypted.

find ~/Documents -type d ( -name .svn ) -prune -o -print | rsyncrypto -vc --trim=3 --filelist - /tmp/Documents/ Documents.keys backup.crt

rewrite the command to exclude from rsyncrypto any files/folders that have .svn in their path?

View 1 Replies View Related

Programming :: Procmail Piping To A PHP Script

Aug 6, 2010

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.

View 1 Replies View Related

Programming :: Piping In Bash Using Python?

Dec 16, 2010

I have a bash script that I want to import in to Python, mainly just to see if I can or not. However in the script I do use some piping of commands into sed to trim it down to what I need. When I tried doing it with the os.system() call, it didn't work. The exact error is

sed: -e expression #1, char 16: unterminated `s' command

However the command that was run can be run in bash without an error. Is there a better/another way to do this? For reference the command is:

Code:

locate -n 1 wp-config.php | sed 's/wp-config.php/
/g' | sed '/wp-config.php/ d' | sed '/^$/ d'

View 3 Replies View Related

General :: Redirecting Or Piping 'somecommand?

Oct 31, 2010

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).

View 2 Replies View Related

Ubuntu Networking :: Capturing Data On .pcap File And Piping It

Jun 22, 2011

I have a GPS device which sends in data on port number 5000, i am able to capture the data into a pcap file using tcpdump. Now my problem is, i need to pipe the data into a text file as and when data arrives into the pcap file continuously.I did extensive search, but to no avail. been trying to solve this for the past 3 days. I use the following commands to capture and pipe the data, but that happens only once when i issue the command. I want this to happen continuously as and when the data arrives.

View 1 Replies View Related

General :: Determine The Actual Command That Is Piping?

Feb 11, 2011

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.

View 2 Replies View Related

General :: Piping Video Device Over SSH Or Tcptunnel ?

Aug 11, 2011

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.

View 2 Replies View Related

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

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved