05-21-2011
Oh sorry, i am creating this bash script to take effect on a C programed file to take out all the comments. Yes this script does work and now i know why thanks alot you made it very clear. just dont understand how it knows if its a comment or if the comment isnt actually a comment and its in the echo command and the */ message /* will appear with the symbols being the same as what you would use for a comment.
Thanks again.
---------- Post updated at 12:06 AM ---------- Previous update was at 12:06 AM ----------
Oh sorry, i am creating this bash script to take effect on a C programed file to take out all the comments. Yes this script does work and now i know why thanks alot you made it very clear. just dont understand how it knows if its a comment or if the comment isnt actually a comment and its in the echo command and the */ message /* will appear with the symbols being the same as what you would use for a comment.
Thanks again.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hello Unix Gurus,
We are doing large system upgrade. We expect upgrade to last 180-200 hours. The servers are located remotely.
I am looking for solution which allows me to reconnect to the same session active on unix server where I launched the process. This would protect from local client... (0 Replies)
Discussion started by: mehtasa
0 Replies
2. Shell Programming and Scripting
I have a file with a single line in it as below.
field1 field2 field3
Different fields separated by spaces. I need the output as below.
field1
field2
field3
Any sed/awk solution you can suggest? (6 Replies)
Discussion started by: krishmaths
6 Replies
3. Shell Programming and Scripting
$db2 connection ...........Q
a=`$db2 -x "select A from tablename where z in (select z from tablename Q where condition fetch first 1 rows only ) with ur"`
b=`$db2 -x "select B from tablename where z in (select z from tablename Q where condition fetch first 1 rows only) with ur"`
$db2... (2 Replies)
Discussion started by: rollthecoin
2 Replies
4. Shell Programming and Scripting
hi
i have one file where i want to substitute only first instance of
swap
with swap1
i want to replcae only first instance of swap in my script
i know we can do this with awk. but i need to do this with sed only
i tried follwoing code
sed 's/swap/swap1' filename
but here all... (15 Replies)
Discussion started by: d_swapneel14
15 Replies
5. Shell Programming and Scripting
Hi,
can anyone help me with my scrip please. I wanted do following tasks:
1. List all the directory
2. A STDIN to ask user to enter a directory name from listed directories
3. command to check if the directory exists( or a command to validate if the user entered a valid directory name)
... (2 Replies)
Discussion started by: eminjan
2 Replies
6. UNIX for Dummies Questions & Answers
Hi All,
I am using LATEX and need to delete all the lines in a file matching:
\begin{work}
I know there are several ways to do this, but I am trying to do it with the substitute command in VI. The problem is I can't get substitute to recognize the character '\'!
How do I do it?
... (7 Replies)
Discussion started by: ScKaSx
7 Replies
7. Shell Programming and Scripting
have this code but when i run it i get this error
./pulse: line 2: and here is the code
#!/bin/bash
if ;
then
pulseaudio -k;
fi
what am i doing wrong
thanks
Adam (5 Replies)
Discussion started by: ab52
5 Replies
8. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Try running 'phone4 xyz' and see what happens.
Modify your program so that if no matching name is found, an... (1 Reply)
Discussion started by: OmgHaxor
1 Replies
9. Shell Programming and Scripting
Hello people,
I am having problem to sort, sed and zero padding of column in csv file.
7th column only.
Input of csv file:
1,2,3,4,5,6,4/1/2010 12:00 AM,8
1,2,3,4,5,6,3/11/2010 9:39 AM,8
1,2,3,4,5,6,5/12/2011 3:43 PM,8
1,2,3,4,5,6,12/20/2009 7:23 PM,8
Output:... (5 Replies)
Discussion started by: sean1357
5 Replies
10. Shell Programming and Scripting
I'm trying to remove '--X' from the whole file and using variables replace $oldvar with $newvar.
I have tried with double quotes but it doesn't seem to work. $newvar is set to /usr/bin/bash. Would appreciate some guidance.
newvar=$(which bash)
oldvar=/bin/bash
sed... (1 Reply)
Discussion started by: itman73
1 Replies
LEARN ABOUT SUNOS
asadmin-delete-domain
asadmin-delete-domain(1AS) User Commands asadmin-delete-domain(1AS)
NAME
asadmin-delete-domain, delete-domain - deletes the givendomain
SYNOPSIS
delete-domain [--terse=false] [--echo=false] [--domaindir install_dir/domains] domain_name
delete-domain deletes the specified domain. The domain must already exist and must be stopped. This command is supported in local mode
only.
OPTIONS
--domaindir directory where the domain is to be deleted. If specified, path must be accessible in the filesystem. If not speci-
fied, the domain in the default install_dir/domains directory is deleted.
--terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well-
formatted data for consumption by a script. Default is false.
--echo setting to true will echo the command line statement on the standard output. Default is false.
OPERANDS
domain_name name of the domain. Must be a unique name.
Example 1: Using delete-domain
asadmin> delete-domain sampleDomain
deleted domain sampleDomain successfully
Where: the sampleDomain domain is deleted.
EXIT STATUS
0 command executed successfully
1 error in executing the command
asadmin-create-domain(1AS), asadmin-start-domain(1AS), asadmin-stop-domain(1AS), asadmin-list-domains(1AS)
J2EE 1.4 SDK March 2004 asadmin-delete-domain(1AS)