10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Have three files. Any other approach with regards to file concatenation or splitting, etc is appreciated
If column55(billngtype) of file1 contains YMNC or YPBC then pick the value of column13(documentnumber). Now find this documentnumber in column1(Billdoc) of file2 and grep the corresponding... (4 Replies)
Discussion started by: as7951
4 Replies
2. Shell Programming and Scripting
(I am using bash)
I have a command that will find the line number in a file by searching for a string where it exists.
linenumber=$(grep -n "string" $FILENAME | cut -d : -fi)
This returns the line number and removes the string. Now that I have the line number I want to subtract 4 from it and... (5 Replies)
Discussion started by: prodigious8
5 Replies
3. Shell Programming and Scripting
Hi,
I have a file (stats.txt) with columns like in the example below. Destination IP address, timestamp, TCP packet sequence number and packet length.
destIP time seqNo packetLength
1.2.3.4 0.01 123 500
1.2.3.5 0.03 44 1500
1.3.2.5 0.08 44 1500
1.2.3.4 0.44... (12 Replies)
Discussion started by: Zooma
12 Replies
4. Shell Programming and Scripting
Hi, I'm currently dev'ing using awk and I'm currently stuck.
Here's the file, with comments on "<--- ":
Record <--- First Pattern
Amount 1 <--- Amount on first transaction
TotalSales 0 <--- Total Sales Prior from previous transactions
Time 1:00:00 <--- Time... (9 Replies)
Discussion started by: Jin_
9 Replies
5. Shell Programming and Scripting
Hi everyone,
I am trying to write a bash script which reads a data file and does some algebraic operations.
here is the structure of data.xml file that I have;
1 <data>
2 .
3 .
4 .
5 </data>
6 <data>
7 .
8 .
9 .
10</data>
etc.
Each data block contains same number of lines (say... (4 Replies)
Discussion started by: hayreter
4 Replies
6. Shell Programming and Scripting
Hi All,
I need a help in the below scenario.
I want to perform few operations as a non root user but those operations can be performed only by the root user. For example I need to modify /etc/hosts file as a non root user. This is just one scenario.
Could you please provide... (3 Replies)
Discussion started by: kalpeer
3 Replies
7. Shell Programming and Scripting
Hi ,
I have a file myhost.txt which contains below,
127.0.0.1 localhost
1.17.1.5 atrpx958
11.17.10.11 atrpx958zone nsybhost
I need to append words only after "atrpx958" like 'myhost' and 'libhost' and not after atrpx958zone.
How to search the word atrpx958(which is hostname) only,... (5 Replies)
Discussion started by: gsreeni
5 Replies
8. Shell Programming and Scripting
Hi Perl Guru,
I'm new to Perl Programming & need some help.
I need to have some kind of similar code template so I can start to work on it.
I'm been reading some forums and did not find anything that are similar so I start to work on it. I've been struggling on how to start it.
Any... (1 Reply)
Discussion started by: devvvt168
1 Replies
9. Shell Programming and Scripting
Hi:
Let's suppose I want to replace all the | by > ONLY when | is between . Usually (and it works) I would do something like
sed -e 's/\(\*\)|\(*\]\)/\1>\2/g'
where I have to "save" some portions of the matched region and use them with the \n metacharacter. I was wondering if I could... (2 Replies)
Discussion started by: islegmar
2 Replies
10. UNIX for Dummies Questions & Answers
Hi
I have a tab delimited file with 3 fields. I need to sort this file on the first field and remove all the records where the first field has dulplicates. For eg my file is
133|arrfdfdg|sdfdsg
234|asfsdgfs|aasdfs
133|affbfsde|dgfg
When this file gets sorted I need the result to be ... (2 Replies)
Discussion started by: monks
2 Replies