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
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
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
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
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
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
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
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
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
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
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
LEARN ABOUT CENTOS
po4aman-display-po
PO4AMAN-DISPLAY-PO(1) Po4a Tools PO4AMAN-DISPLAY-PO(1)
NAME
po4aman-display-po - display a translated man page according to a PO
SYNOPSIS
po4aman-display-po -p PO_FILE [-m MASTER_FILE] [-o PO4A_OPT]
DESCRIPTION
po4aman-display-po can be used by a translator who wants to check how the man page being translated in a PO will be displayed.
The manual page must be in one of the formats supported by the po4a's man module. The manual page can be provided on the command line, or
installed on the system.
Manual pages generated from other formats, like DocBook or POD, are not supported. See po4apod-display-po(1) for an equivalent supporting
POD documents.
OPTIONS
-p PO_FILE
The PO file containing the translations.
-m MASTER_FILE
The original man page. It can be the absolute or relative path to the original man page (gzipped or not), the name the man page or the
name and section of the man page (using the man.section format). When the master document is not provided with the -m option,
po4aman-display-po tries to find the original man page based on the line reference of the first string in the PO.
-o PO4A_OPT
Some options to pass to po4a-translate(1).
SEE ALSO
po4apod-display-po(1)
AUTHOR
Thomas Huriaux
Po4a Tools 2006-04-08 PO4AMAN-DISPLAY-PO(1)