Hello Awk Gurus,
Can anyone of you help me with the below problem. I have got a file having data in below format
pmFaultyTransportBlocks
-----------------------
9842993
pmFrmNoOfDiscRachFrames
-----------------------
NULL
pmNoRecRandomAccSuccess
-----------------------... (4 Replies)
For lists in sed, to say what to replace, is this correct:
I am hoping that this would recognise that either a "." is present, or that the substitution happens at the end of the line.
For files with extensions , my script works perfectly.
My problem is, files without extentions, i.e. . ... (1 Reply)
:confused: Is it possible to send a variable to a sed or cut command? I have a test script as below:
counter=1
while read line
do
# Test the file
printf "$line" > temp$counter
pref=$(cut c1-2000 $temp$counter | sed 's///g' | sed 's|.*PutTime\(.*)Origin.*|\1|')
printf" let... (5 Replies)
Hello I am trying to make an awk script that always replaces the same characters in a file, with white space in between. Can anyone write a script that prompts for the 3 numbers and then replaces them in the file?
eg.
enter a b c:
'it then puts a b c in the file.
The file format is always
... (12 Replies)
1. The problem statement, all variables and given/known data:
Problem Statement for project:
When an account is created on the CS Unix network, a
public html directory is created in the account's home directory. A default web page is put into that directory.
Some users replace or... (13 Replies)
Hi all
I use aix (sadly).
I've got a file consisting of fields separated by commas, I need a sed or awk command that will delete all spaces between two commas as long as there are only spaces between the commas.
eg
,abc, ,sd , ,dr at
would become
,abc,,sd ,,dr at
I have... (53 Replies)
Hi,
I have a script that, basically, has two input files of this type:
file1
key1=value1_1_1
key2=value1_2_1
key4=value1_4_1
...
file2
key2=value2_2_1
key2=value2_2_2
key3=value2_3_1
key4=value2_4_1
...
My files are 10k lines big each (approx).
The keys are strings that don't... (7 Replies)
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)
Hi guys,
I have been trying to do this, but... no luck so maybe you can help me.
I have a line like this:
Total Handled, Received, on queue Input Mgs: 140 / 14 => 0
I need to, get the number after the / until the =, to get only 14 .
Any help is greatly appreciated.
Thanks, (4 Replies)
hi,
i want to remove 12 and 13 column from psv files and dump them in new folder
ls -ltr *GTDA_Dly_Pmix_*.psv>filename.xls
var1=`cat filename.xls`
for i in $var1
do
var3=`echo "$i" |cut -d '|' -f12,13 |sort -u`
sed -e 's/"|$var3"//g... (2 Replies)