10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all I have 7 words ina file called "lookupfile"
CAD
CD
HT
RA
T1D
T2D
BD
in other file I have data like this in which columns are seaprated by comma but the names among above seven names are in one column menas comma between these seven words doesnt mean that they are separated by... (9 Replies)
Discussion started by: manigrover
9 Replies
2. Shell Programming and Scripting
Hi All
I need help
am having a source file as below
emp
dept
class
subclass
region
country
division
first i need to get line count and i need to divide by 3 it is an parameter passing value
number of lines 7 (8 Replies)
Discussion started by: ragu.selvaraj
8 Replies
3. Shell Programming and Scripting
Hi, consider a file which has data such as
"random text",912345,"54","finish"
"random text",9991236745,"9954","finish"
I want to replace the numbers that don't have double quotes around them with ones that do; so the output should be
"random text","912345","54","finish"
"random... (4 Replies)
Discussion started by: Storms
4 Replies
4. Shell Programming and Scripting
Hi All,
I tried to solve this but the result gives me all zeros for one file. I failed to do for all 500 files.
I have some 500 files with the extension .dat I have another set of files; 500 in number with extension .dic I created these .dic files by using sort -u from the actual .dat files.... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies
5. Shell Programming and Scripting
Hi all,
Looking for suggestions on a better way to sum numbers in a key value pair formated file. What I have works but seems really clunky to me. Any suggestions would be greatly appreciated.
cat test.txt | perl -ne 'm/(M=)(\d+\.?\d?\d?)/ && print "$2\n"' | awk '{ sum+=$1} END {printf... (7 Replies)
Discussion started by: cgol
7 Replies
6. Shell Programming and Scripting
Hi,
I was trying to extract the last word with all numbers using awk. like the below example. I am looking for a pattern using awk.
desired result: (13 Replies)
Discussion started by: hitmansilentass
13 Replies
7. Shell Programming and Scripting
Hi all,
I'm new to shell scripting and hence this query.
I have 2 files. temp.txt and config.txt.
The values in temp.txt are tab separated.
ex: temp.txt
AB CDE GHIJ OPQRS WXY
ex:config.txt (1st line for 1st element of temp.txt and so on)
start = '1' end='5'
start = '6' end =... (26 Replies)
Discussion started by: subhrap.das
26 Replies
8. Shell Programming and Scripting
hi ,
i m having a html file and this file looks like this
<ssl>
<name>PIA</name>
<enabled>true</enabled>
<listen-port>39370</listen-port>
</ssl>
<log>
<name>PIA</name>
</log>
<execute-queue>
<name>weblogic.kernel.Default</name>
... (7 Replies)
Discussion started by: becksram123
7 Replies
9. Shell Programming and Scripting
Hi ppl,
I am a bit lost on this...can some one assist. I know this can be down with awk or sed, but i cant get the exact syntax right.
I need to only extract the numbers from a signle word ( eg abcd.123.xyz )
How can i extract 123 only ?
Thanks (14 Replies)
Discussion started by: systemali
14 Replies
10. Shell Programming and Scripting
Hello !
I have a result of ls command in a file:
file1 file2 file3.out file4.pdf file5
they all are separated by space.
I need to put them on a separate line
example:
file1
file2
file3.out
file4.pdf
fil35
i tried
sed 's/ /\n/g' inputfile > outputfile
but did not help (3 Replies)
Discussion started by: hemangjani
3 Replies