11-08-2011
I hope know its working fine...
This User Gave Thanks to siva shankar For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm doing manual way to add and remove "#" on etc/services.
Is there anyway I can modify the file using awk or sed or any other program.
I use vi to modify /etc/services for enabling telnet , the problem is I don't know how to do it automatically in script.
production state:
#telnet
... (9 Replies)
Discussion started by: skully
9 Replies
2. UNIX for Advanced & Expert Users
I have a requirement like below.I need to Comment some lines in a file.
File contains following information.
{
attribute1
attribute2
atrribute3
attribute4
attribute5
attribute6
attribute7
}
I have a requirement like some times i need to comment lines 3 to before '}' and some... (1 Reply)
Discussion started by: ukatru
1 Replies
3. Shell Programming and Scripting
Hello,
I'm trying to make a shell script to skip comments from an XML file, but with the code below only deletes comments that are in one line.
Can you tell me what can be added here?
nawk '
{
if($0 !~/<!--/) { a=0 }
if($0 ~/<!--/ && $0 ~/-->/) {a=1}
if($0 ~/<!--/) {a=1}
if... (1 Reply)
Discussion started by: majormark
1 Replies
4. UNIX for Dummies Questions & Answers
How can I delete comments (lines beginning with /* and ending with */) in file?
with single command line..My suggestion is to use grep and sed! (4 Replies)
Discussion started by: aadi_uni
4 Replies
5. Shell Programming and Scripting
I must write a script to change all C++ like comments:
// this is a comment
to this one
/* this is a comment */
How to do it by sed? With file:
#include <cstdio>
using namespace std; //one
// two
int main() {
printf("Example"); // three
}//four
the result should be: (2 Replies)
Discussion started by: black_hawk
2 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I am using BASH. How can I remove any lines in a text file that are either blank or begin with a # (ie. comments)? Thanks in advance.
Mike (3 Replies)
Discussion started by: msb65
3 Replies
7. Linux
Hi,
I have a files as shown below and I wanted to sort then in following patter based on there names which has "_" in it. I want to sort them according to feild 6th (bold once)value as shown below.
Thanks in advance.
File names:
20111014_manish_STEP2_Files_number__5979-6968_ ... (5 Replies)
Discussion started by: manishkomar007
5 Replies
8. Shell Programming and Scripting
Hello Unix board community,
I have to program a shell script, but I am a complete noob so I hope I get some help here. The assignment is as follows:
The program removes all comments regardless of formatting or language from files with specific file name extensions (php, css, js, ...).... (3 Replies)
Discussion started by: TheZeusMan
3 Replies
9. Shell Programming and Scripting
Hi
I have this sample data set as follows (called file.txt):
hostname1:user1:password
hostname2:user1:password #comments comments
hostname3:user1:passwordI wish to produce a report as follows:
hostname1 user1 password
hostname2 user1 password
hostname3 user1 passwordie remove all... (11 Replies)
Discussion started by: tsu3000
11 Replies
10. Shell Programming and Scripting
As I stated in a previous thread - I'm a newbie to Unix/Linux and programming. I'm trying to learn the basics on my own using a couple books and the exercises provided inside.
I've reached an exercise that has me stumped. I need to write a bash script that will will read in a file and print the... (11 Replies)
Discussion started by: ksmarine1980
11 Replies
LEARN ABOUT DEBIAN
xsession.options
Xsession.options(5) File Formats Manual Xsession.options(5)
NAME
Xsession.options - configuration options for Xsession(5)
DESCRIPTION
/etc/X11/Xsession.options contains a set of flags that determine some of the behavior of the Xsession(5) Bourne shell (sh(1)) script. See
the Xsession(5) manpage for further information.
Xsession.options may contain comments, which begin with a hash mark ('#') and end at the next newline, just like comments in shell scripts.
The rest of the file consists of options which are expressed as words separated by hyphens, with only one option per line. Options are
enabled by simply placing them in the file; they are disabled by prefixing the option name with 'no-'.
Available options are:
allow-failsafe
If the 'failsafe' argument is passed to the Xsession script, an emergency X session is invoked, consisting of only an x-termi-
nal-emulator(1) in the upper-left hand corner of the screen. No window manager is started. If an x-terminal-emulator program is
not available, the session exits immediately.
allow-user-resources
If users have a file called .Xresources in their home directories, these resources will be merged with the default X resources when
they log in.
allow-user-xsession
If users have an executable file called .xsession in their home directories, it can be used as the startup program for the X session
(see Xsession(5)). If the file is present but not executable, it may still be used, but is assumed to be a Bourne shell script, and
executed with sh(1).
use-session-dbus
If the dbus package is installed, the session bus will be activated at X session launch.
use-ssh-agent
If the ssh-agent(1) program is available and no agent process appears to be running already, the X session will be invoked by
exec'ing ssh-agent with the startup command, instead of the startup command directly.
All of the above options are enabled by default. Additional options may be supported by the local administrator. Xsession(5) describes
how this is accomplished.
AUTHORS
Stephen Early, Mark Eichin, and Branden Robinson developed Debian's X session handling scripts. Branden Robinson wrote this manual page.
SEE ALSO
Xsession(5), ssh-agent(1), x-terminal-emulator(1)
Debian Project 2004-10-31 Xsession.options(5)