Search Results

Search: Posts Made By: Ribosome
1,975
Posted By Subbeh
Try with sed: sed...
Try with sed:
sed '/Date_de_Publication_Periodique.*XMLSchema#date/s/[0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}/JJJJJJ/' MM_NN-A1B1C1_ABC.rdf
Forum: Programming 04-19-2013
4,700
Posted By Praveen_218
You know what -There was a Perl script I had got...
You know what -There was a Perl script I had got from CPAN to generate SHA1 checksum of files in a directory, I modified to suite my needs, for the project I was working at, and the script was taking...
11,330
Posted By Corona688
In what way is that 'not working'? Does it not...
In what way is that 'not working'? Does it not have that option, or does it accept it yet misbehave somehow?

For systems which don't have -B, you can write a small awk script:

$ cat...
2,507
Posted By bakunin
It should be easy: according to your sample a...
It should be easy: according to your sample a "column" is: zero or more non-","-characters followed by a ",". The regexp for this is:

/[^,]*,/

In sed you can use numbers to make the...
2,089
Posted By RudiC
It is not. It sets the positional parameters $1...
It is not. It sets the positional parameters $1 ... $n to the elements of $LINE.


What about e.g. VARIABLE=$2?
2,089
Posted By Corona688
OLDIFS="$IFS" IFS="\"=" while read LINE do ...
OLDIFS="$IFS"
IFS="\"="
while read LINE
do
[[ "$LINE" == *"<TRANSFORMATION"* ]] || continue

set -- $LINE

while [ "$#" -gt 0 ]
do
case "$1"...
1,356
Posted By Don Cragun
In case the previous comments were too cryptic,...
In case the previous comments were too cryptic, the command:
find . –type d –name "?d*" –print
will look for files in or under the current directory (.) of type directory (-type d) with a name that...
55,500
Posted By chihung
To exactly retrieve the value from an XML file,...
To exactly retrieve the value from an XML file, you need to use an XML tool such as xmllint. It comes with Linux by default.

$ version=`xmllint --xpath...
55,500
Posted By panyam
variable_sto_store=`awk -F"[<>]"...
variable_sto_store=`awk -F"[<>]" '/CFBundleVersion/ {getline;print $3;exit}' input.xml`

If you want to capture it outside.
16,031
Posted By balajesuri
Does it have to be awk? perl -F"," -lane...
Does it have to be awk?
perl -F"," -lane '$F[8]="N" if ($F[3]=="MN"); print join (",",@F)' file.txt---------- Post updated at 15:03 ---------- Previous update was at 14:58 ----------

My first...
4,534
Posted By ctsgnb
awk -F"\"" '/<[\/]*bul:CollectionTemplate[>...
awk -F"\"" '/<[\/]*bul:CollectionTemplate[> ]/{x=!x;f=(x&&/15min/)?"Parameter15min.txt":"Parameter1h.txt"}x&&/id/{print $(NF-1) >> f ; close f}' infile---------- Post updated at 10:32 PM -

Use...
5,129
Posted By Scrutinizer
This is a one-liner version of agama's approach...
This is a one-liner version of agama's approach which may speed thing up a little bit.
awk -F: '{t=$1*3600+$2*60+$3} NR>1{printf( "%.6f\n", t-p)}{p=t}' infile
4,820
Posted By frans
something likesed -n '/\<component/,/.*>/p'...
something likesed -n '/\<component/,/.*>/p' infile.xml | grep -E 'version=|description='
14,208
Posted By chella
Hi, sed 's/^/ramesh/g;s/$/vellanki/g'...
Hi,

sed 's/^/ramesh/g;s/$/vellanki/g' faulty.txt


Regards,
Chella
22,359
Posted By zazzybob
Please don't post duplicate threads in multiple...
Please don't post duplicate threads in multiple forums. If somebody can offer you their assistance, they will - posting more than once will not yield a faster response! I have removed the duplicate...
Showing results 1 to 15 of 15

 
All times are GMT -4. The time now is 11:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy