01-17-2008
You don't need awk, printf is sufficient ...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Is there a standard way to make a shell script read a file, or list, and skip each line that contains # at the begining, or ignores the content starting after a # in line?
I'm looking to mimic the way commenting in a shell script normally works. This way I can comment my text files and lists my... (4 Replies)
Discussion started by: sysera
4 Replies
2. Shell Programming and Scripting
From the below file I want to grep only the lines except the comment sections. But grep -v "#" is eliminating the last line because it has one # in between.
Any idea how can I ignore only the lines which have # at the begining (I mean comment lines) ?
Thanks a lot to all in advance
C Saha (1 Reply)
Discussion started by: csaha
1 Replies
3. Shell Programming and Scripting
Dear all,
When i ask a question in my script if the answer is not correct i need to goback to the begning of the script and ask the question again.
ex - What is your name ?
saman
Name is not correct ...try again
What is the name ?
Nimal
Thank you.... (2 Replies)
Discussion started by: Nayanajith
2 Replies
4. Shell Programming and Scripting
All,
i have some doubt on #!/bin/bash or #!/bin/ksh at the begining of script.
Need to know folowing thing ?
-- what would be the problem if i will mention in the first line #!/bin/bash
and will use korn shell syntax and the reverse ?
-- Can i mention at the... (1 Reply)
Discussion started by: jambesh
1 Replies
5. Shell Programming and Scripting
I am trying to write for my class project a shell script, using bourne shell, that will take one command, either -l or -w. If -l is entered then the script should output the names of all the files in my working directory sorted in increasing order of the number of lines in the file. If -w is input... (2 Replies)
Discussion started by: C.Ronaldo-7-
2 Replies
6. Shell Programming and Scripting
I have a file shows as below. I would like to put # before CCCC. so how to do in Solaris. Here sed doesnot support -i
AAAA
BBBB
CCCCC
DDDDD
EEEEE
FFFFFF (1 Reply)
Discussion started by: madhusmita
1 Replies
7. UNIX for Dummies Questions & Answers
What is the Best book to learn UNIX from the begining?
am really a beginner and no nothing about UNIX, so what are the track that i have to trace in order to be a professional in UNIX and scripting?
What are the best books to learn it and what are the certificates such as CCNA in networks... (5 Replies)
Discussion started by: eng.pirlo
5 Replies
8. UNIX for Advanced & Expert Users
Hi Experts,
here is a background to my problem :
I am exporting data from teradata using fastexport utility, as varchar data.
This pads additional two bytes (2 places as seen in notepad) in the resultset.
I have found out other means of avoiding it but can't use varchar option in that... (5 Replies)
Discussion started by: sumoka
5 Replies
9. Shell Programming and Scripting
Hi,
I want to insert columns into a file. Some are standard (e.g. 1) and some are dependent on the contents on other columns. I am using the following code
In the below the first 1 (after $2), can be a 1 or 3 depending on what $1 starts with
e.g. if $1 is 405 then the third field in the... (7 Replies)
Discussion started by: ksexton
7 Replies
10. UNIX for Dummies Questions & Answers
Hello again people,
I have a list of websites in this format:
domain.com
domain1.com
domain2.com
domainwww.com
domain2www.com
domain3www.com
www.domain.com
www.domain2.com
www.domain3.com
I want to replace the string "www." with "nothing" but only lines that start with "www."
... (3 Replies)
Discussion started by: galford
3 Replies