07-18-2013
Remove SAS comments using UNIX
I have tried a lot, Need your help guys.
SAS Program:
data one ; /* Data step */
Input name $; /*Dec variables*/
I want to remove the commented part(/* Data step */) alone. I have tried using sed command but it is deleting the entire line itself. i need unix command to separate this and get the output as shown below.
Output :
data one ;
Input name $;
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
It may be a no-brainer, but the answer is escaping me right now:
I'm trying to write a little script to remove all comments from .c source... I was thinking sed, but I'm not a very strong regexp user (e.g. I suck with sed).
I tried dumping the file into:
sed -e 's/\/\* * \*\///g'
and several... (1 Reply)
Discussion started by: LivinFree
1 Replies
2. UNIX for Dummies Questions & Answers
Hi All,
Im trying to write a Unix FTP batch file within a program called SAS. Now i already have one for windows which works fine, but it doesnt work within unix.
I've been told that some of the commands are different from Windows to Unix, and ive looked round and am completely stumped...
... (0 Replies)
Discussion started by: shenniko
0 Replies
3. Shell Programming and Scripting
#! /bin/sed -nf
# Remove C and C++ comments, by Brian Hiles (brian_hiles@rocketmail.com)
# Sped up (and bugfixed to some extent) by Paolo Bonzini (bonzini@gnu.org)
# Works its way through the line, copying to hold space the text up to the
# first special character (/, ", '). The original... (1 Reply)
Discussion started by: Priyaranjan
1 Replies
4. Shell Programming and Scripting
Suppose i have a file like this:
#bla bla
#bla bla bla bla bla
Bla
BLA
BLA BLA #bla bla
....
....
how can i remove all comments from every line,even if they are behind commands or strngs that are not comments?
any idea how i could do that using awk? (2 Replies)
Discussion started by: bashuser2
2 Replies
5. 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
6. Shell Programming and Scripting
Is there a way that I can use sed to remove lines with css comments like this?
/* comment */ (9 Replies)
Discussion started by: gravesit
9 Replies
7. Shell Programming and Scripting
I need to use sed to remove comments from files. I am using this, but it only works on comments that start at the beginning of the line.
sed /^"\/\/"/d
In most of the files I have comments like this:
code // Comments
or
tab // Comments (5 Replies)
Discussion started by: gravesit
5 Replies
8. Shell Programming and Scripting
I would like to remove comments from a bash script. In addition, I would like to remove lines that consist of only white spaces, and to remove blank lines.
#!/bin/bash
perl -pe 's/ *#.*$//g' $1 | grep -v ^]*$ | perl -pe 's/ +/ /g' > $2
#
# $1 INFILE
# $2 OUTFILE
The above code... (10 Replies)
Discussion started by: LessNux
10 Replies
9. Shell Programming and Scripting
i have to remove the commented (/* . . . .*/) part which starts in one line and ends in other.help me with generic code because i have 1000 to 10k lines code which i have to remove.
data one;
set work.temp;
input name age;
infile filename;
/* dfsdf
dsfs
sdfdf
dsdd
sdfsf
sdfsf
sfs... (4 Replies)
Discussion started by: saaisiva
4 Replies
10. Shell Programming and Scripting
Hi , We need to remove comment like pattern from a code text. The possible comment expressions are as follows.
Input
BizComment : Special/*@
Name:bzt_53_3aea640a_51783afa_5d64_0
BizHidden:true
@*/
/* lookup Disease
Category Therapuetic Class */
a=b;... (6 Replies)
Discussion started by: VikashKumar
6 Replies
LEARN ABOUT CENTOS
imsettings-switch
imsettings-switch(1) imsettings-switch(1)
NAME
imsettings-switch - Switch Input Method
SYNOPSIS
imsettings-switch [ -hnqrx ] [ --no-update ] [ --quiet ] [ --restart ] [ --read-xinputrc ] [ --help ] [Input Method name | configuration
filename]
DESCRIPTION
imsettings-switch switches Input Method which is managed under imsettings. Either Input Method name or configuration filename are required
unless --read-xinputrc option is specified to determine the target from $HOME/.config/imsettings/xinputrc or $xinputrcdir/xinputrc.
OPTIONS
This program follows the usual GNU command line syntax, with long options starting with two dashes (`-'). A summary of options is included
below.
-n --no-update
Do not update $HOME/imsettings/xinputrc. without this option, imsettings-switch will updates it with the targeted Input Method.
-q --quiet
Do not show any messages except errors.
-r --restart
Restart the given Input Method or one which is determined from xinputrc by --read-xinputrc option.
-x --read-xinputrc
Determine the targeted Input Method from $HOME/imsettings/xinputrc or $xinputrcdir/xinputrc if not available.
-h --help
Show summary of options
Input Method name
Switch Input Method to Input Method name.
configuration filename
Switch Input Method to configuration filename.
SEE ALSO
imsettings-list(1) imsettings-reload(1)
AUTHOR
This manual page was written by Akira TAGOH <akira@tagoh.org>
Apr 10, 2013 imsettings-switch(1)