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


ADVERTISEMENT

General :: Executing A Shell Command In Emacs?

Dec 17, 2010

I tried to execute a shell command by M-! cmd RET but it did not work.M-! does not turn up in the microbuffer no matter how many times I press Alt+!.But if I go to Tools menu and select Shell Command... option then it writes M-! to the microbuffer and everything works fine.What is the problem here?

View 2 Replies View Related

Programming :: Show The Output Of Shell Command Into A Textbox, Ex Ps -efc Command?

Oct 20, 2010

I am using gtk to program GUI. How can I show the output of shell command into a textbox, ex ps -efc command ?

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 :: 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 :: 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

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

Ubuntu :: Emacs Initialization/shell Script?

Jun 21, 2011

I have emacs23 from the Lucid repository.I know how to load and edit remote python files with

Code:
C-x C-f /ssh:usr@domain:/directory/*.py
Since I use this same command every time I open emacs, and I see that you can use lisp

[code]....

View 2 Replies View Related

OpenSUSE :: Using Emacs Shell-bash-mode-hook?

Feb 26, 2010

I want to show line numbers automatically in bash scripts (a habit of being a programmer) and when I load an emacs lisp file it works from the command below but the following command that sets up the same thing for bash scripts doesn't work. I played around with this for quite some time and couldn't find anything that would make work.This is the first time I have tried to customize emacs so it could easily be something ignorant on my part.

;; Load additional packages
(load-file "~/.elisp/whitespace.el")
(load-file "~/.elisp/setnu+.el")

[code]....

View 1 Replies View Related

Ubuntu :: Customize AUCTeX View Command In Emacs?

May 20, 2010

I've been using Emacs with the AUCTeX package to edit and compile my .tex documents lately, but there's something that's been bugging me. First, here is the short question:How can I costumize the default view command emacs runs when I type C^c C^c <enter>?I've read that it's done with the tex-view-dvi-command variable, but I've had no luck getting it to work at all.Now the explanation:It bugs me that whenever I type C^c C^c to compile, and then C^c C^c to view dvi, emacs doesn't automatically give focus to the dvi viewer (xdvi). Digging a little, I found out that the command "wmctrl -a main" gives focus to xdvi ("main" is the title of the xdvi window). So, if I can only customize AUCTeX's standard view command to include "&& wmctrl -a main" at the end, than my problem would be solved

View 2 Replies View Related

General :: Bash: Emacs: Command Not Found?

Oct 18, 2010

i am using scientific linux, fedora 12accidentaly i changed LD_LIBRARY_PATH of the root profile to a different location. so terminal cannot understand any command as i type. is there any other ways to access .bashrc file exept using editors emacs, vi, nedit. my own profile works fine but i dont have permission to access the root folder. only commands the terminal responds to are pwd, cd, echo. i dont have any clue how to restore the library because it locates here:

[root@localhost ~]# echo $PATH
/usr/local/src/root/bin:
[root@localhost ~]# nedit .bashrc

[code]....

View 4 Replies View Related

Ubuntu :: Code In Emacs File To Start Emacs Maximized?

May 17, 2010

I was using the following code in my .emacs file to start emacs maximized:

Quote:
(defun toggle-fullscreen ()
(interactive)
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32
'(2 "_NET_WM_STATE_MAXIMIZED_VERT" 0))
(x-send-client-message nil 0 nil "_NET_WM_STATE" 32

[Code]...

View 2 Replies View Related

General :: Append Command Output To File By Giving Command In Terminal?

Jul 3, 2009

I am using openSUSE 10.3.When I install software from tarball then to record time required I send output of date to beg.txt(when installation begins) and end.txt (when installation finishes).How can I append output of date to a file so I don't need two files?

View 4 Replies View Related

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 View Related

General :: Redirecting Command Output To Input Of Another Command?

Jul 2, 2011

I want to run gsettings list-schemas (which return a list of about 100 names separated by spaces)and somehow direct each name one at a time as the input to this command:gsettings list-recursivelyI've tried it with awk, and standard | piping and also as a string variable strvar=$(gsettings list-schemas) and using the $strvar as the input butam missing something in between I'm sure like for - while or proper syntax of awk etc

View 3 Replies View Related

General :: Use Output Of Previous Command As Parameter To Another Command?

Nov 13, 2010

I want to use the output of a previous command as a parameter to another command. For example: to know where "nice" is stored i typed: which nice output: /usr/bin/nice now the second command i typed is: ls -l /usr/bin/nice Is there a way to have a single command like: ls -l which nice ?

View 4 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 :: 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 :: 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 :: Bash Ambiguous Redirect - Redirect One Command Output Which Will Be Treat As A Content Of File For Another Command?

Mar 9, 2011

I am trying to grep multiple numbers from file, grep does have the -f option for that.

Code: grep -f <`seq 500 520` /etc/passwd I know this could be done with

Code: for i in `seq 500 520`; do grep "$i" /etc/passwd; done But my question is fare more behind this example. It is possible to redirect one command output which will be treat as a content of file for another command ?

View 2 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 :: Run A Command Per File From The Output Of "find" Command?

Sep 8, 2010

I want to scan a particular directory recursively and run a particular command with each file as input. For this I am using "find /dir/path". I dont want to write any long script containing loop on the output of "find". I want a single command which will allow me to run a command on each file of the "find" command output.

View 3 Replies View Related

Ubuntu :: Continuous View Of Ls Command Output?

Feb 14, 2010

My server is currently copying a large amount of date. I periodically check how much has already been copied by using the "ls" command in the destination folder. Is there a way so that ls kind of self updates itself? Like in a log or so? Or like when using cp -v?

View 9 Replies View Related







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