Sponsored Content
Top Forums UNIX for Dummies Questions & Answers passing command output from one command to the next command in cshell Post 302597589 by Corona688 on Friday 10th of February 2012 04:54:48 PM
Old 02-10-2012
[QUOTE=kaaliakahn;302597583]HI Guys,

I hope you are well. I am trying to write a script that gets executed every time i open a shell (cshell). I have two questions about that


1) I need to enter these commands

$ echo $DISPLAY
$ setenv $DISPLAY output_of_echo_$display_command[/code]

You already have the value of 'echo $DISPLAY' -- it's in $DISPLAY. Why not just setenv DISPLAY "$DISPLAY" ?


Quote:
2) What do i need to do to make this script run every time, i open a shell window
Depends what your cshell is. For tcsh, put it in your ~/.tcshrc

Quote:
How would i do this in the bash shell?
export DISPLAY="whatever" in your ~/.bashrc
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

problem with output of find command being input to basename command...

Hi, I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script. I am planning to do like this: if ; then... (2 Replies)
Discussion started by: new_learner
2 Replies

2. UNIX for Dummies Questions & Answers

Command display output on console and simultaneously save the command and its output

Hi folks, Please advise which command/command line shall I run; 1) to display the command and its output on console 2) simultaneous to save the command and its output on a file I tried tee command as follows; $ ps aux | grep mysql | tee /path/to/output.txt It displayed the... (7 Replies)
Discussion started by: satimis
7 Replies

3. Shell Programming and Scripting

Wildcard in Cshell find command

The following command works fine in my cshell script: set Deliverables = `find . -name "eliverables" -print` The following command does not work: set LASFiles = `find . -name "*." -print` In the first example, when tested in an if statement, the script will continue whether a... (3 Replies)
Discussion started by: phudgens
3 Replies

4. UNIX for Advanced & Expert Users

Repeat output of last command w/o repeating last command

Is there a way to repeat the output of the last command for filtering without running the command again? All I could think of was to copy all the data to a text file and process it that way, is there another way? Like say I want to grep server.server.lan from a dtrace that was pages long after I... (5 Replies)
Discussion started by: glev2005
5 Replies

5. UNIX for Dummies Questions & Answers

Passing command output as an argument to a shell script

Hi, I have a very small requirement where i need to pass command output as an argument while invoking the shell script.. I need to call like this sh testscript.sh ' ls -t Appl*and*abc* | head -n 1' This will list one file name as ana argument.. I will be using "$1" in the shell... (2 Replies)
Discussion started by: pssandeep
2 Replies

6. Shell Programming and Scripting

Want to terminate command execution when string found in the command output

Hi Experts, I am very much new to linux scripting, I am currently working on reducing my manual work and hence writing a script to automate few task. I am running below command to snmpwalk the router.. snmpwalk -v 3 -u WANDL_SU -a MD5 -A vfipmpls -x DES -X VfIpMpLs -l authPriv... (19 Replies)
Discussion started by: Hanumant.madane
19 Replies

7. Shell Programming and Scripting

Help with Passing the Output of grep to sed command - to find and replace a string in a file.

I have a file example.txt as follows :SomeTextGoesHere $$TODAY_DT=20140818 $$TODAY_DT=20140818 $$TODAY_DT=20140818I need to automatically update the date (20140818) in the above file, by getting the new date as argument, using a shell script. (It would even be better if I could pass... (5 Replies)
Discussion started by: SriRamKrish
5 Replies

8. UNIX for Dummies Questions & Answers

Set Command to output a log of every command executed in the script

Hi Guys, I like to output every command executed in the script to a file. I have tried set -x which does the same. But it is not giving the logs of the child script which is being called from my script. Is there any parameters in the Set command or someother way where i can see the log... (2 Replies)
Discussion started by: mac4rfree
2 Replies

9. Shell Programming and Scripting

Insert title as output of command to appended file if no output from command

I am using UNIX to create a script on our system. I have setup my commands to append their output to an outage file. However, some of the commands return no output and so I would like something to take their place. What I need The following command is placed at the prompt: TICLI... (4 Replies)
Discussion started by: jbrass
4 Replies

10. Shell Programming and Scripting

How to execute a command on each line of output from another command?

Hello :) new to bash not to programming. I have an on-going need to change the owning group on sets of files and directories from the one they were created with or changed to on update to the one they need to have going forward. find {target_root} -group wrong_group gets me a newline... (4 Replies)
Discussion started by: naftali
4 Replies
OROBORUS(1)						      General Commands Manual						       OROBORUS(1)

NAME
oroborus - lightweight themeable window manager for X. DESCRIPTION
Oroborus is a small and simple window manager which does exactly what it says it does, manage windows. There is no fancy doc, clip, wharf, or a root menu for that matter. These utilities can be provided by other programs such as "deskmenu". Oroborus has support for Gnome and session management, or can be run as a stand-alone window manager. FILES
See oroborusrc(5) for details. OPTIONS
Oroborus accepts the following options: -r, --file=FILE use an alternative rcfile instead of $HOME/.oroborusrc. -r, --display=DISPLAY use an alternative display instead of $DISPLAY. --sm-client-id use the specified session management id. -v, --verbose Print more information. -h, --help Show summary of options. -V, --version Show version of program. SEE ALSO
oroborusrc(5) deskmenu(1) desklaunch(1) keylaunch(1) idesk(1) dfm(1) AUTHOR
This manual page was written by Stefan Pfetzing <dreamind@dreamind.de>. OROBORUS(1)
All times are GMT -4. The time now is 12:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy