10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi friends,
This is sed & awk type question.
I have a text file which has numbers spread all over the file. I want to sum the series of numbers whenever i find it and produce an output file with the sum. For example
###start of input text file ####
abc
def
ghi
1
2
3
4
kjld
random... (3 Replies)
Discussion started by: kaaliakahn
3 Replies
2. Shell Programming and Scripting
Hello,
I'm trying to figure out how to use sed or awk to delete single lines in a file. By single, I mean lines that are not touching any other lines (just one line with white space above and below).
Example:
one
two
three
four
five
six
seven
eight
I want it to look like: (6 Replies)
Discussion started by: slimjbe
6 Replies
3. Shell Programming and Scripting
Hello,
I would like to remove the first column of lines beginning by a character (in my case is an open square bracket) and finishing by a space (or any other delimiter).
For example:
string1 string2 string3
to
string2 string3
I found this previous topic:
... (1 Reply)
Discussion started by: stoyanova
1 Replies
4. Shell Programming and Scripting
Hi. Can anybody help me with a script to extract usernames, shell and home_directory from the /etc/passwd file.
I am stuck (2 Replies)
Discussion started by: Pauline mugisha
2 Replies
5. Shell Programming and Scripting
hello everyone,
well I have a file which contains data, I want to add the data on hourly basis, like my file contains data for 24 hours, (so a total of 1440 ) lines.
Now i want to add the data on hourly basis to get average values.
like if I use (head) command it is ok for first go, but... (5 Replies)
Discussion started by: jojo123
5 Replies
6. Shell Programming and Scripting
dear all,
on solaris10 for x86 i am trying to modify the creation date of a postscript file with sed in a csh script. sed is driving me crazy though...i think due to the spaces in the string i am trying to substitute??
part of the postscript file:
%!PS-Adobe-3.0... (3 Replies)
Discussion started by: lada niva
3 Replies
7. Shell Programming and Scripting
I have a file with a list of about 2500 lines that I'd like to reformat using some regex in notepad++ or sed from my box (FreeBSD 6.3-RELEASE i386) to do the following:
convert from:
mycommand > mydocument0.htmlbcfn
mycommand > mydocument1.htmlcdcsfn
mycommand > mydocument2.htmldechfn... (6 Replies)
Discussion started by: phpfreak
6 Replies
8. Shell Programming and Scripting
Hi, Im very new to the world of sed so I'm really not even sure if this is possible. What i need to do is read from a flat file and every time i see this line:
VAL=123,456
I need to change 456 to 457 for every occurence of this line in the file. The numbers 123 and 456 are different for... (6 Replies)
Discussion started by: LT_2008
6 Replies
9. UNIX for Dummies Questions & Answers
Hi, I have a slight problem in trying to manipulate the text within a file using the "sed" command in that the text i need changed has "/" slashes in.
I have a .sh script that scans the "/db/sybbackup/" directories for any .dmp file older than 2 days and then to >> the information to a file called... (3 Replies)
Discussion started by: Jefferson333
3 Replies
10. Shell Programming and Scripting
I have a list of names and email addresses, like this. The <tab> markers are actually tabs.
joe.blow <tab> joe.blow@wherever.com
tom.t.hall <tab> tom.t.hall@wherever.com
john.r.smith <tab> john.r.smith@wherever.com
sally.jones <tab> sally.jones@state.or.us
I want to parse the data so that... (3 Replies)
Discussion started by: manouche
3 Replies