Search Results

Search found 490 results on 20 pages for 'awk'.

Page 7/20 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • SQL like group by and sum for text files in command line?

    - by dnkb
    I have huge text files with two fields, the first is a string the second is an integer. The files are sorted by the first field. What I'd like to get in the output is one line per unique string and the sum of the numbers for the identical strings. Some strings appear only once while other appear multiple times. E.g. Given the sample data below, for the string glehnia I'd like to get 10+22=32 in the result. Any suggestions how to do this either with gnuwin32 command line tools or in linux shell? Thanks! glehnia 10 glehnia 22 glehniae 343 glehnii 923 glei 1171 glei 2283 glei 3466 gleib 914 gleiber 652 gleiberg 495 gleiberg 709

    Read the article

  • Bash script using eyeD3 to remove extra tags from mp3 files

    - by jaguare22
    I found what looks like the perfect script for this but getting errors. Hoping someone can see problem. I am running 12.04 Server. Error is - awk: line 0: regular expression compile failed (missing '(') ): awk: line 0: regular expression compile failed (missing '(') ) The following tags have been found in the mp3s: These tags are to be stripped: Here is a the script obtained from savvyadmin !/bin/bash Script name: strip-tags.sh Original Author: Ian of DarkStarShout Blog Site: http://darkstarshout.blogspot.com/ Options slightly modified to liking of SavvyAdmin.com oktags="TALB APIC TCON TPE1 TPE2 TPE3 TIT2 TRCK TYER TCOM TPOS" indexfile=mktemp Determine tags present: find . -iname "*.mp3" -exec eyeD3 --no-color -v {} \; $indexfile tagspresent=sort -u $indexfile | awk -F\): '/^<.*$/ {print $1}' \ | uniq | awk -F\)\> '{print $1}' | awk -F\( '{print $(NF)}' \ | awk 'BEGIN {ORS=" "} {print $0}' rm $indexfile Determine tags to strip: tostrip=echo -n $tagspresent $oktags $oktags \ | awk 'BEGIN {RS=" "; ORS="\n"} {print $0}' | sort | uniq -u \ | awk 'BEGIN {ORS=" "} {print $0}' Confirm action: echo echo The following tags have been found in the mp3s: echo $tagspresent echo These tags are to be stripped: echo $tostrip echo echo -n Press enter to confirm, or Ctrl+C to cancel... read dummy Strip 'em stripstring=echo $tostrip \ | awk 'BEGIN {FS="\n"; RS=" "} {print "--set-text-frame=" $1 ": "}' First pass copies any v1.x tags to v2.3 and strips unwanted tag data. Second pass removes v1.x tags, since I don't like to use them. Without --no-tagging-time-frame, a new unwanted tag is added. :-) find . -iname "*.mp3" \ -exec eyeD3 --to-v2.3 --no-tagging-time-frame $stripstring {} \; \ -exec eyeD3 --remove-v1 --no-tagging-time-frame {} \; echo "Script complete!"

    Read the article

  • Bash Script help required

    - by Sunil J
    I am trying to get this bash script that i found on a forum to work. Copied it to text editor. Saved it as script.sh chmod 700 and tried to run it. rootdir="/usr/share/malware" day=`date +%Y%m%d` url=`echo "wget -qO - http://lists.clean-mx.com/pipermail/viruswatch/$day/thread.html |\ awk '/\[Virus/'|tail -n 1|sed 's:\": :g' |\ awk '{print \"http://lists.clean-mx.com/pipermail/viruswatch/$day/\"$3}'"|sh` filename=`wget -qO - http://lists.clean-mx.com/pipermail/viruswatch/$day/thread.html |\ awk '/\[Virus/'|tail -n 1|sed 's:": :g' |awk '{print $3}'` links -dump $url$filename | awk '/Up/'|grep "TR\|exe" | awk '{print $2,$8,$10,$11,$12"\n"}' > $rootdir/>$filename dirname=`wget -qO - http://lists.clean-mx.com/pipermail/viruswatch/$day/thread.html |\ awk '/\[Virus/'|tail -n 1|sed 's:": :g' |awk '{print $3}'|sed 's:.html::g'` rm -rf $rootdir/$dirname mkdir $rootdir/$dirname cd $rootdir grep "exe$" $filename |awk '{print "wget \""$5"\""}' | sh ls *.exe | xargs md5 >> checksums mv *.exe $dirname rm -r $rootdir/*exe* mv checksums $rootdir/$dirname mv $filename $rootdir/$dirname I get the following message.. script.sh: line 11: /usr/share/malware/: Is a directory script.sh: line 11: links: command not found

    Read the article

  • how to get access to environment variables from output file

    - by getjoefree
    I want to get variables from a output file specific location,and input file format as below: log1.txt format: [v] Output Data <Value>DIMM_A,4096,1600,Hynix,HMT351S6CFR8C-PB,0942E041,1206,01,Hynix,,</Value> or log2.txt format: [v] Output Data <Value>DIMM_B,4096,1600,Hynix,HMT351S6CFR8C-PB,017E90AE,1205,01,Hynix,,</Value> <Value>DIMM_A,4096,1600,Hynix,HMT351S6CFR8C-PB,012E908D,1205,01,Hynix,,</Value> and we want to get output OUT.TXT file format as below: if log1.txt format and then output file format: SET DIMM1=DIMM_A,4096,1600,Hynix,HMT351S6CFR8C-PB,0942E041,1206,01,Hynix,, if log2.txt format and then output file format: SET DIMM2=DIMM_B,4096,1600,Hynix,HMT351S6CFR8C-PB,017E90AE,1205,01,Hynix,, SET DIMM1=DIMM_A,4096,1600,Hynix,HMT351S6CFR8C-PB,012E908D,1205,01,Hynix,, who could you help to me? thanks!

    Read the article

  • Using nawk, how to print the first names for all those in the 916 area code? [closed]

    - by Steve
    Possible Duplicate: Using nawk, how to print all first names containing four characters? Using nawk, how to print the first names for all those in the 916 area code? I've tried nawk ‘$3 ~ /(916)/{print $1}’ inputfile but didn' work. Jody Savage:(206) 548-1278:15:188:150 Guy Quigley:(916) 343-6410:250:100:175 Dan Savage:(406) 298-7744:450:300:275 Nancy McNeil:(206) 548-1278:250:80:75 John Goldenrod:(916) 348-4278:250:100:175 Chet Main:(510) 548-5258:50:95:135

    Read the article

  • Adding line with text between pattern and next occurence of the same pattern in bash

    - by kasper
    I am writing a bash script that modifies a file that looks like this: --- usr1 --- data data data data data data data data data data data data --- usr2 --- data data data data data data data data --- usr3 --- data data data data --- endline --- One question is: How to add next user line --- usrn --- after last user data lines? Second one is: How to delete specific user data lines (data lines and --- userx ---) i.e. I would like to delete usr2 with all his data set. It must work on bash 2.05 :) and I think it will use awk or sed, but I'm not sure.

    Read the article

  • Pattern Matching in Columns

    - by Chronicles
    File 1 A11;F1;BMW A23;F2;BMW B12;F3;BMW H11;F4;JBW File 2 P01;A1;0;0--00 ;123;456;150 P01;A11;0;0--00 ;123;444;208 P01;B12;0;0--00 ;123;111;36 P01;V11;0;0--00 ;123;787;33.9 Output -;-;-;P01;A1;0;0--00 ;123;456;150 A11;F1;BMW;P01;A11;0;0--00 ;123;444;208 B12;F3;BMW;P01;B12;0;0--00 ;123;111;36 -;-;-;P01;V11;0;0--00 ;123;787;33.9 I TRIED awk 'FNR==NR {a[$2] = $0; next }{ if($1 in a) {p=$1;$1="";print a[p],$0}}' File1 File2 But didnt work. Basically I want to get the details from FILE 1 and compare with FILE2 (master list) . Example : A1 in FILE2 was not available in FILE1 , so in output file we have “-“ for 1st three fields and rest from FILE2 . Now, we have A11 and we got the detail in FILE1. So we write details of A11 from both File 1 & 2

    Read the article

  • How to extract all IDs accessed from a mysql general log using the linux commandline?

    - by shlomoid
    This should be a trivial question for anyone who's good with bash/sed/awk. Unfortunately, I'm not, yet :) I've got a general log from MySQL which contains some queries that have a common parameter, they query on a specific id field. The queries look like update tbl set col='binary_values' where id=X; I need to process the log and extract all the IDs that these queries touched, each in it's own line. The purpose of this is to figure out how many times each ID is accessed. Eventually I'd group and count the values. The binary values are indeed binary junk, so they kinda messed up some things I've been trying to do. Eventually we solved the problem temporarily using a python script, but I'm sure the linux command line tool set can do it too. How would you do it?

    Read the article

  • How can I replace a line which contains only -------- by |||

    - by mimou
    I have something like: ------------------------------------------------------------------------ r2 | username | 2011-01-16 16:52:23 +0100 (Sun, 16 Jan 2011) | 1 line Changed paths: D /foo Removed foo ------------------------------------------------------------------------ r1 | username | 2011-01-16 16:51:03 +0100 (Sun, 16 Jan 2011) | 1 line Changed paths: A /foo created foo ------------------------------------------------------------------------ My target is to identify the file added by the "username" in a specific date. Thus, I need to have the combination (username, 16 Jan 2011, A) to insure that it is the right file ands then print foo. My idea is to: delete the white spaces change the newlines into | get rid of the --------------- and replace them with newlines but the problem is that I couldn't replace the ------- since they are mixed with other characters. ------------------------------------------------------------------------ |r2|username|2011-01-1616:52:23+0100(Sun,16Jan2011)|1line|Changedpaths:|D/foo|Removedfoo| ------------------------------------------------------------------------ |r1|username|2011-01-1616:51:03+0100(Sun,16Jan2011)|1line|Changedpaths:|A/foo|createdfoo| ------------------------------------------------------------------------ So I thought it would be a good idea to start by replacing the --------------- by a special character like ||| and then change this character by a newline using awk FS=||| OFS=\n Can anyone help me! thanks

    Read the article

  • sorting group of lines

    - by benjamin button
    I have a text file like below iv_destination_code_10 TAP310_mapping_RATERUSG_iv_destination_code_10 RATERUSG.iv_destination_code_10 = WORK.maf_feature_info[53,6] iv_destination_code_2 TAP310_mapping_RATERUSG_iv_destination_code_2 RATERUSG.iv_destination_code_2 = WORK.maf_feature_info[1,6] iv_destination_code_3 TAP310_mapping_RATERUSG_iv_destination_code_3 RATERUSG.iv_destination_code_3 = WORK.maf_feature_info[7,6] iv_destination_code_4 TAP310_mapping_RATERUSG_iv_destination_code_4 RATERUSG.iv_destination_code_4 = WORK.maf_feature_info[13,6] iv_destination_code_5 TAP310_mapping_RATERUSG_iv_destination_code_5 RATERUSG.iv_destination_code_5 = WORK.maf_feature_info[19,6] iv_destination_code_6 TAP310_mapping_RATERUSG_iv_destination_code_6 RATERUSG.iv_destination_code_6 = WORK.maf_feature_info[29,6] iv_destination_code_7 TAP310_mapping_RATERUSG_iv_destination_code_7 RATERUSG.iv_destination_code_7 = WORK.maf_feature_info[35,6] iv_destination_code_8 TAP310_mapping_RATERUSG_iv_destination_code_8 RATERUSG.iv_destination_code_8 = WORK.maf_feature_info[41,6] iv_destination_code_9 TAP310_mapping_RATERUSG_iv_destination_code_9 RATERUSG.iv_destination_code_9 = WORK.maf_feature_info[47,6] combination of three lines form a unit: iv_destination_code_9 TAP310_mapping_RATERUSG_iv_destination_code_9 RATERUSG.iv_destination_code_9 = WORK.maf_feature_info[47,6] is one unit. iv_destination_code_9 9 indicates the number by which i have to sort 10 9 8.... i need a shell script/awk which will sort the units in a descending order. how is it possible?

    Read the article

  • How to print lines from a file that have repeated more than six times

    - by Mike
    I have a file containing the data shown below. The first comma-delimited field may be repeated any number of times, and I want to print only the lines after the sixth repetition of any value of this field For example, there are eight fields with 1111111 as the first field, and I want to print only the seventh and eighth of these records Input file: 1111111,aaaaaaaa,14 1111111,bbbbbbbb,14 1111111,cccccccc,14 1111111,dddddddd,14 1111111,eeeeeeee,14 1111111,ffffffff,14 1111111,gggggggg,14 1111111,hhhhhhhh,14 2222222,aaaaaaaa,14 2222222,bbbbbbbb,14 2222222,cccccccc,14 2222222,dddddddd,14 2222222,eeeeeeee,14 2222222,ffffffff,14 2222222,gggggggg,14 3333333,aaaaaaaa,14 3333333,bbbbbbbb,14 3333333,cccccccc,14 3333333,dddddddd,14 3333333,eeeeeeee,14 3333333,ffffffff,14 3333333,gggggggg,14 3333333,hhhhhhhh,14 Output: 1111111,gggggggg,14 1111111,hhhhhhhh,14 2222222,gggggggg,14 3333333,gggggggg,14 3333333,hhhhhhhh,14 What I have tried is to transponse the 2nd and 3rd fields with respect to 1st, so that I can use nawk on the field of $7 or $8 #!/usr/bin/ksh awk -F"," '{ a[$1]; b[$1]=b[$1]","$2 c[$1]=c[$1]","$3} END{ for(i in a){ print i","b[i]","c[i]} } ' file > output.txt

    Read the article

  • how can I split up this string

    - by lacrosse1991
    I am currently trying to sanitize some log files so they are in an easier format to read, and have been trying to use the gnu cut command, which works fairly well, although I cannot really think of a good way to remove the [INFO] part of the string logs/logs/server_1283258036.log:2010-08-31 23:06:51 [INFO] <NateMar> where?! logs/logs/server_1281904775.log:2010-08-15 22:59:53 [INFO] <BoonTheMoon> §b<BoonTheMoon>§ohhhhhh I would ultimately want to get the strings down to something that resembles the following 2010-08-31 23:06:51 <NateMar> where?! 2010-08-15 22:59:53 <BoonTheMoon> ohhhhhh how should I go about doing this? Have thought about using awk, although Im having a difficult time getting a grip on how that would work, so not sure how to set up something to do that, any help would be greatly appreciated, thanks!

    Read the article

  • Linux - Bash Redirect a String to a file

    - by user3502786
    I wrote a simple script that is reading the file content and incrementing a a number inside this file, then i'm holding the change using awk, when i'm trying ro redirect the new String using '' the whole string is redirected in one line and not like the original was which is 4 lines. #!/bin/bash -x # This script is for Incrementing build numbers path=/home/RND/abrodov file=tst.txt tst=`cat $path/$file` printf "this is the content of the file before incrementing: \n $tst" newexpr=`awk '/^Build Number/{$4=$4+1;}1' /home/RND/abrodov/tst.txt` printf "\n the new content \n $newexpr" echo $newexpr > $path/$file This is the original file before running the script: Major Release Number = 4 Minor Release Number = 1 Service Pack Release Number = 2 Build Number = 22 This is the content after i used the script: Major Release Number = 4 Minor Release Number = 1 Service Pack Release Number = 2 Build Number = 23 I'm trying to figure out how can i redirect the text in the original format which is 4 lines.

    Read the article

  • substitute string in php from another file

    - by Gjergj Sheldija
    i have some old php files which i'd like to convert to use gettext. those files have a content like this : $LD = 'Some String'; $Another = 'some other ~n~ string'; i have to substitute all the $LD, $Another in the files where they are declared with something like : _('Some string'); hacking a bit a created some sort of regexp to find the declarations, my aim was to use sed and awk to do the replaces..but i don't have any clue on how to do those substitutions ... any help ...

    Read the article

  • Copy one column over another in a delimited file

    - by user275455
    For instance, I needed to remove column 25 and replace it with a copy of column 22 in a simple csv file with no embedded delimiters. The best I could come up with was the awkward looking: awk -F, '{ for(x=1;x<25;x++){printf("%s,", $x)};printf("%s,",$22);for(x=26;x<59;x++){printf ("%s,", $x)};print $59}' I would expect something like cut -d, -f1-24,23,26-59 to work but cut doesn't seem to want to print the same column two times... Is there a more elegant way to do it using anything typicaly available in a linux shell environment?

    Read the article

  • Merge 2 lines into one

    - by shantanuo
    I have a text file starts with 9 digits college code and ends with of 5 digits course code. 512161000 EN5121 K. K. Jorge Institute of Engineering Education and Research, Nashik 61220 Mechanical Engineering [Second Shift] XOPENH 1 116 16978 517261123 EN5172 R. C. Rustom Institute of Technology, Shirpur 61220 Mechanical Engineering [Second Shift] YOPENH 1 100 29555 617561234 EN6175 abc xyz Education Trust, abc xyz College of Engineering, Pune 61220 Mechanical Engineering [Second Shift] ZOPENH 2 105 25017 There are some entries where there is a line break as shown in the 3 example above. I need to merge 3rd and 4th line into one just like 1st and 2nd line, so that I can easily use command like grep, awk etc.

    Read the article

  • Replace delimited block of text in file with the contents of another file

    - by rmarimon
    I need to write a simple script to replace a block of text in a configuration file with the contents of another file. Let's assume with have the following simplified files: server.xml <?xml version='1.0' encoding='UTF-8'?> <Server port="8005" shutdown="SHUTDOWN"> <Service name="Catalina"> <Connector port="80" protocol="HTTP/1.1"/> <Engine name="Catalina" defaultHost="localhost"> <!-- BEGIN realm --> <sometags/> <sometags/> <!-- END realm --> <Host name="localhost" appBase="webapps"/> </Engine> </Service> </Server> realm.xml <Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/> I want to run a script and have realm.xml replace the contents between the <!-- BEGIN realm --> and <!-- END realm --> lines. If realm.xml changes then whenever the script is run again it will replace the lines again with the new contents of realm.xml. This is intended to be run in /etc/init.d/tomcat on startup of the service on multiple installations on which the realm is going to be different. I'm not so sure how can I do this simply with awk or sed.

    Read the article

  • how to find the last instance of a setting in a config file

    - by Glenn Kelley
    I am trying to figure out how to find the last entry of a string in multiple config files across a server. Each of the strings will be in the /home/***usernamewouldbehere/public_html/typo3conf/localconf.php file In short - the last entry in the config files will point to the database server the application is utilizing - and we need to know which accounts point to which db server. While I can run something like this - grep "$_db_host" /home/*/public_html/conf/localconf.php It does not really help much because it gives us way to much information ... and not what we really need. What i really need to know is the last entry of this string $_db_host = 'xx'; and to sort them out in an export file Since the config files may have multiple entries (example below) $_db_host = 'localhost'; $_db_host = '10.0.1.234'; It would be great to list in a file all of those that have the entry for 'localhost' and then list all of those that have the entry for '10.0.1.234' (or whichever server there may be there) but even if I need to do that manually that would be great. I am not sure how to get to it using Awk - ... and really stuck What I am hoping for is something that would be piped as follows db_host = localhost /home/username1/www/conf/localconf.php db_host = localhost / home/username2/public_html/conf/localconf.php db_host= '10.1.2.23' /home/username55/public_html/conf/localconf.php hoping that helps you help me :-)

    Read the article

  • Creating multiple csv files from data within a csv file.

    - by S1syphus
    System OSX or Linux I'm trying to automate my work flow at work, each week I receive an excel file, which I convert to a csv. An example is: ,,L1,,,L2,,,L3,,,L4,,,L5,,,L6,,,L7,,,L8,,,L9,,,L10,,,L11, Title,r/t,needed,actual,Inst,needed,actual,Inst,needed,actual,Inst,needed,actual,Inst,neede d,actual,Inst,needed,actual,Inst,needed,actual,Inst,needed,actual,Inst,needed,actual,Inst,needed,actual,Inst,needed,actual,Inst EXAMPLEfoo,60,6,6,6,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 EXAMPLEbar,30,6,6,12,6,7,14,6,6,12,6,6,12,6,8,16,6,7,14,6,7.5,15,6,6,12,6,8,16,6,0,0,6,7,14 EXAMPLE1,60,3,3,3,3,5,5,3,4,4,3,3,3,3,6,6,3,4,4,3,3,3,3,4,4,3,8,8,3,0,0,3,4,4 EXAMPLE2,120,6,6,3,0,0,0,6,8,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 EXAMPLE3,60,6,6,6,6,8,8,6,6,6,6,6,6,0,0,0,0,0,0,6,8,8,6,6,6,0,0,0,0,0,0,0,10,10 EXAMPLE4,30,6,6,12,6,7,14,6,6,12,6,6,12,3,5.5,11,6,7.5,15,6,6,12,6,0,0,6,9,18,6,0,0,6,6.5,13 And so you can get a picture of how it looks in excel: What I need to do, is create multiple csv files for each instance in row 1, so L1, L2, L3, L4... And within that each csv file it needs to contain the title, r/t, needed So for L1 an example out put would look like: EXAMPLEfoo,60,6 EXAMPLEbar,30,6 EXAMPLE1,60,3 EXAMPLE2,120,6 EXAMPLE3,60,6 EXAMPLE4,30,6 And for L2: EXAMPLEfoo,60,0 EXAMPLEbar,30,6 EXAMPLE1,60,3 EXAMPLE2,120,0 EXAMPLE3,60,6 EXAMPLE4,30,6 And so on. I have tried playing around with sed and awk and hit google but I have found nothing that really solves the issue. I'd imagine perl would be particular suited to this or maybe python, so I would be more than happy to accept suggestions from users. So, any suggestions? Thanks in advance.

    Read the article

  • grep from a log file to get count

    - by subodh1989
    I have to get certain count from files. The grep statement i am using is like this : counter_pstn=0 completed_count_pstn=0 rec=0 for rec in `(grep "merged" update_completed*.log | awk '{print $1}' | sed 's/ //g' | cut -d':' -f2)` do if [ $counter_pstn -eq 0 ] then completed_count_pstn=$rec else completed_count_pstn=$(($completed_count_pstn+$rec)) fi counter_pstn=$(($counter_pstn+1)) done echo "Completed Orders PSTN Primary " $completed_count_pstn But the log file contains data in this format : 2500 rows merged. 2500 rows merged. 2500 rows merged. 2500 rows merged.2500 rows merged. 2500 rows merged. 2500 rows merged. As a result , it is missing out the count of one merge(eg on line 4 of output).How do i modify the grep or use another function to get the count. NOTE that the 2500 number maybe for different logs. So we have to use "rows merged" pattern to get the count. i have tried -o ,-w grep options,but it is not working. Expected output from above data: 17500 Actual output showing : 15000

    Read the article

  • sed or greo or awk to match very very long lines

    - by yael
    more file param1=" 1,deerfntjefnerjfntrjgntrjnvgrvgrtbvggfrjbntr*rfr4fv*frfftrjgtrignmtignmtyightygjn 2,3,4,5,6,7,8, rfcmckmfdkckemdio8u548384omxc,mor0ckofcmineucfhcbdjcnedjcnywedpeodl40fcrcmkedmrikmckffmcrffmrfrifmtrifmrifvysdfn drfr4fdr4fmedmifmitfmifrtfrfrfrfnurfnurnfrunfrufnrufnrufnrufnruf"** # need to match the content of param1 as sed -n "/$param1/p" file but because the line length (very long line) I cant match the line what’s the best way to match very long lines?

    Read the article

  • Using for or while loops

    - by Gary
    Every month, 4 or 5 text files are created. The data in the files is pulled into MS Access and used in a mailmerge. Each file contains a header. This is an example: HEADER|0000000130|0000527350|0000171250|0000058000|0000756600|0000814753|0000819455|100106 The 2nd field is the number of records contained in the file (excluding the header line). The last field is the date in the form yymmdd. Using gawk (for Windows), I've done ok with rearranging/modifying the data and writing it all out to a new file for importing into Access except for the following. I'm trying to create a unique ID number for each record. The ID number has the form 1mmddyyXXXX, where XXXX is a number, padded with leading zeros. Using the header above, the first record in the output file would get the ID number 10106100001 and the last record would get the ID 10106100130. I've tried putting the second field in the header into a variable, rearranging the last header field into the required date format and then looping with "for" statements to append the XXXX part of the ID and then outputting it all with printf but so far I've been complete rubbish at it. Thanks for your help! gary

    Read the article

  • Combining multiple lines into one line

    - by mkal
    I have this use case of an xml file with input like Input: <abc a="1"> <val>0.25</val> </abc> <abc a="2"> <val>0.25</val> </abc> <abc a="3"> <val>0.35</val> </abc> ... Output: <abc a="1"><val>0.25</val></abc> <abc a="2"><val>0.25</val></abc> <abc a="3"><val>0.35</val></abc> I have around 200K lines in a file in the Input format, how can I quickly convert this into output format.

    Read the article

  • grep for value of keyvaue pair and format

    - by imerez
    When I do the following ps -aef|grep "asdf" I get a list of processes that are running. Each one of my process has the following text in the output: -ProcessName=XXXX I'd like to be able to format the out put so all I get is: The following processes are running: Process A Process B etc..

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >