Hi there,
may someone easily help me on this :
I want to insert a text in a specific line number like :
linenumb2start=`cat memory_map.dld | nl -ba | egrep -i "label" | cut -f1`
line2insert=`expr $linenumb2start + 2`
and now I need to replace something like {} with {comment} at... (8 Replies)
Hello -
I am running Linux. I want to place a comment char at the beginning of a line in a file. For example:
testvar=`grep username /etc/people
sed -e 's/$testvar/#$testvar/g' /etc/people
I cannot get the above commands to put a comment at the beginning of the line.
Any... (3 Replies)
I want to replace this line : "test compare visible] true" and make it "#test compare visible] true".
How can I do it ? And it should be checked in many sub folder files also. (6 Replies)
Hi,
I would like to get rid of all comment in an xml file by grep or sed command:
The content seem like this:
<!-- ab cd
ef gh
ij kl -->
Anyone can help?
Thanks and Regards (3 Replies)
I'm trying to write a script to help automate some VERY tedious manual tasks.
I have groups of fairly large XML files (~3mb+) that I need to edit.
I need to look through the files and parse the XML looking for a certain flag contained in a field. If I find this flag (an integer value) I need... (4 Replies)
I am running a script remotely to do the following
1. Kill all processes by a user
2. Uninstall certain packages
3. FTP over a new file
4. Kill a ldap process that is not allowing my /devdsk/c0t0d0s7 slice to un-mount
5. Unmount /h
6. comment out the slice in vfstab
7. newfs the... (9 Replies)
I have a requirement where I want to add a comment '#' in my crontab, run a process, than remove the '#' I added.
Example cron
#5,10 * * * * ls -lt /tmp
10,5 * * * * ls -lt /var
I would like to be able use sed or awk to add a '#' at the begining of each
line. After the command... (4 Replies)
I need to comment the lines starting with pattern "exclude" or "exclude=". If the work exclude comes at any other part, ignore it. Also, ignore, excludes, excluded etc. Ie only comment the line starting with exclude.
File contents.
exclude
exclude=
hi I am excluded
excludes
excludes=
... (9 Replies)
I am trying to comment out the crontab entries using sed.
I want to comment it out for a particular environment say '/mypath/scripts/'.
Using the full path as pattern, it is working. but using variable it is not working. i have tried double quotes too. but no luck!
$ crontab -l
... (3 Replies)
Hi,
I need to comment out (insert # in the front of a line) a line that has entry Defaults requiretty using command-line as I need to do this on hundreds of servers.
From
Defaults requiretty
To
#Defaults requiretty
I tried something like below but no luck: Please advise,... (3 Replies)
Discussion started by: prvnrk
3 Replies
LEARN ABOUT DEBIAN
oarcp
oarsh(1) OAR commands oarsh(1)NAME
oarsh - remote shell connector for OAR batch scheduler.
oarcp - oarsh compagnon to copy files from a node or to a node.
SYNOPSIS
oarsh [OPTIONS] <NODENAME> [COMMAND]
oarcp [OPTIONS] [NODENAME:]<PATHNAME> [NODENAME:]<PATHNAME>
DESCRIPTION
Connect a node from the submission frontal of the cluster or any node.
OPTIONS
oarsh uses OpenSSH client (the ssh command) underneath to perform the connection. Thus any OpenSSH option can be used.
ENVIRONMENT
OAR_JOB_ID
From the frontal of the cluster or any node, specify the Id of the job oarsh must connect to.
OAR_JOB_KEY_FILE
Specify a job key oarsh must use, e.g. the one that was used for the submission of the job you want to connect to. This is mandatory
when connecting to a node of a job from a host that does not belong to the nodes managed by the OAR server the job was submitted to.
The -i option may be used as well.
CONFIGURATION
In order to provide the user with the ability to use oarsh to connect both the nodes of his job or other hosts that live out of the scope
of his job, oarsh tries to read two configuration files: first ~/.oarsh-host-include then ~/.oarsh-hosts-exclude.
If exist, those files must contain one regular expression matching a hostname per line.
At execution time, if oarsh finds in ~/.oarsh-host-include a match for the hostname used in the command line, it continues with the
execution of oarsh, skipping ~/.oarsh-hosts-exclude file. If not, it tries to find a match in ~/.oarsh-hosts-exclude and if one is found,
then executes ssh with the same command line. Finally, it no match is found (or for instance, if none of those files exists), it continues
with the execution of oarsh.
For instance, if all nodes look like name-XXX.domain, one may place ^[^.]+-[[:digit:]]+ in ~/.oarsh-host-include and .* in
~/.oarsh-hosts-exclude and then can use oarsh to connect any host.
The feature finally becomes really sexy when one considers placing a symlink to oarsh named ssh, and then can always use the ssh command to
connect any host.
EXAMPLES
Connecting from within our job, from one node to another one (node23):
> oarsh node-23
Connecting to a node (node23) of our job (Id: 4242) from the frontal of the cluster:
> OAR_JOB_ID=4242 oarsh node-23
Connecting to a node (node23) of our job that was submitted using a job key:
> OAR_JOB_KEY_FILE=~/my_key oarsh node-23
Same thing but using OpenSSH-like -i option:
> oarsh -i ~/my_key node-23
NOTES
All OpenSSH features should be inherited by oarsh, for instance X11 forwarding. However, one feature that oarsh does break is the SSH
Agent.
None of OpenSSH user configuration files (within ~/.ssh directory) are used by oarsh.
SEE ALSO oarsub(1), oardel(1)oarstat(1), oarnodes(1), oarhold(1), oarresume(1)COPYRIGHTS
Copyright 2008 Laboratoire d'Informatique de Grenoble (http://www.liglab.fr). This software is licensed under the GNU Library General Public License. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
oarsh 2012-05-23 oarsh(1)