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
HI All,
I am new to unix. I have a file would like to do some editing by using awk, cut and sed. Could anyone help?
This file contain 100 lines. There are one line for example:
2,"102343454",5060,"579668","579668","579668","SIP",,,"825922","035885221283026",1,268,"00:59:00.782 APR 17... (2 Replies)
Discussion started by: mimilaw
2 Replies
3. 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
4. Shell Programming and Scripting
Hello,
i have a file, i open the file and read the line, i want to get the first item in the csv file and also teh third+6 item and wirte it to a new csv file. only problem is that using echo it takes TOO LONG:
please help a newbie. below is my code:
WorkingDir=$1
FileName=`cut -d ',' -f... (2 Replies)
Discussion started by: limamichelle
2 Replies
5. Shell Programming and Scripting
Hi Gurus,I have a seemingly simple problem but struggling with it.It is as follows :
I/p string -
ABCDEFGHIJ20100909.txt
desired o/p -
AB,DEF,20100909,ABCDEFGHIJ20100909.txt
How to achieve it ?Thanks in advance.
Please use code tags, thank you (20 Replies)
Discussion started by: sumoka
20 Replies
6. UNIX for Dummies Questions & Answers
Hi,
From the file "example" with lines like below, I need the int value associated with ENG , i.e, 123
SUB: ENG123, GROUP 1
SUB: HIS124, GROUP 1
..
..
Normally , i do
grep ENG example | cut -d ' ' -f 2 | cut -c 4-6
Is it possible to do it in simpler way using awk/sed ?
... (5 Replies)
Discussion started by: priyam
5 Replies
7. Shell Programming and Scripting
I have been reading for a few hours trying to educate myself enough to accomplish this task, so please know I have performed some research. Unfortunately, I am not a *NIX scripting expert, or a coder. I come from a network background instead.
SO, here is my desired outcome. I have some Cisco... (5 Replies)
Discussion started by: abbzer0
5 Replies
8. Shell Programming and Scripting
Hi
Can i have an example where i should be able to cut columns
(like for eg cut -c 1-3) in sed or awk.
Regards
Dhana (12 Replies)
Discussion started by: dhanamurthy
12 Replies
9. Shell Programming and Scripting
Good afternoon,
Sir's,
I would like to seek your assistance regarding on this matter.
$cat file1
111 aaaa bbb aass
aaa files file1
temp temp1
pix 222 11 22 1 33 44
desired output:
aaaa bbb aass
files file1
temp1
222 11 22 1 33 44
thanks (7 Replies)
Discussion started by: invinzin21
7 Replies
10. UNIX for Dummies Questions & Answers
hi again...need new help guys:p
the file contains following infos...
users/abc/bla1.exe
newusers/defgh/ik/albg2.exe
users2/opww/ertz/qqwertzu/rwerwew.exe
how to get the file content into...
users/abc/
newusers/defgh/ik/
users2/opww/ertz/qqwertzu/
with...
you can erase the... (5 Replies)
Discussion started by: svennie
5 Replies