Sponsored Content
Top Forums Shell Programming and Scripting Echo printing a line in 2 lines; expected to print in one line Post 302927290 by linuxUser_ on Tuesday 2nd of December 2014 01:14:02 AM
Old 12-02-2014
now I am able to sed, Thanks a lot.
I have another issue.
content of my file:
Code:
al                 62987al  1               g  0300.00   5000.00  0600.00      1 
 0.02559589e+02-0.01063224e-02 0.07202828e-06-0.02121105e-09 0.02289429e-13    2 
 0.03890214e+06 0.05234522e+02 0.02736825e+02-0.05912374e-02-0.04033938e-05    3 
 0.02322343e-07-0.01705599e-10 0.03886795e+06 0.04363880e+02                   4 
al2h6              62987al  2h   6          g  0300.00   1500.00  0600.00      1 
 0.02634884e+02 0.02135952e+00 0.03154151e-05-0.07684674e-07 0.02335832e-10    2 
 0.08871346e+05 0.09827515e+02-0.06800681e+02 0.05080744e+00 0.01039747e-03    3 
-0.01119582e-05 0.08459155e-09 0.01060537e+06 0.05554526e+03                   4

similar to previous sed commands I wanted to sed "al" and " al2h6" with some other word like LONG0003 say ...
but problem is sed will replace all "al"s
How can I get-ride of this situation?

Thanks & Regards,
linuxUser_
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

print lines AFTER lines cointaining a regexp (or print every first and fourth line)

Hi all, This should be very easy but I can't figure it out... I have a file that looks like this: @SRR057408.1 FW8Y5CK02R652T length=34 AGCAGTGGTATCAACGCAGAGTAAGCAGTGGTAT +SRR057408.1 FW8Y5CK02R652T length=34 FIIHFF6666?=:88@@@BBD:::?@ABBAAA>8 @SRR057408.2 FW8Y5CK02TBMHV length=52... (1 Reply)
Discussion started by: kmkocot
1 Replies

2. Shell Programming and Scripting

Print (echo) variable in a single line

Hi, I have written this code ------------------------------------------------ # !/bin/ksh i=0 while do j=$i while do echo -e $j #printf "%d",$j j=`expr $j - 1` done echo i=`expr $i + 1` done ---------------------------------------------------- The ouput which... (2 Replies)
Discussion started by: rac
2 Replies

3. Shell Programming and Scripting

print - for printing whole line, but delimeters are changed to spaces

Hi consider the source file R|field1|field2 using the print statement in awk prints it as R field1 field2 Is there an easier way to print the whole line in its original format (i.e. with | delimiters) than doing print $1"|"$2"|"$3 ?? Thanks Storms (1 Reply)
Discussion started by: Storms
1 Replies

4. Shell Programming and Scripting

String search and print next all lines in one line until blank line

Dear all I want to search special string in file and then print next all line in one line until blank lines come. Help me plz for same. My input file and desire op file is as under. i/p file: A1/EXT "BSCABD1_21233G1" 757 130823 1157 RADIO X-CEIVER ADMINISTRATION BTS EXTERNAL FAULT ... (7 Replies)
Discussion started by: jaydeep_sadaria
7 Replies

5. Shell Programming and Scripting

Need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line...

Hello, I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be: SRVXPAPI001 ERRO JUN24 07:28:34 1775 REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F ... (8 Replies)
Discussion started by: Ferocci
8 Replies

6. Shell Programming and Scripting

Printing multiple lines on the same line between specific text

This is an extract from a large file. The lines that start with fc are ports on a fabric switch. In between each fc port there is information about the port. fc2/12 is up Port description is SEIEDISCOVER-3 Speed is 4 Gbps fc2/13 is down (Administratively down) fc2/14 is up Port... (1 Reply)
Discussion started by: kieranfoley
1 Replies

7. Shell Programming and Scripting

Grep echo awk print all output on one line

Hello, I've been trying to find the answer to this with Google and trying to browse the forums, but I haven't been able to come up with anything. If this has already been answered, please link me to the thread as I can't find it. I've been asked to write a script that pulls a list of our CPE... (51 Replies)
Discussion started by: rwalker
51 Replies

8. UNIX for Beginners Questions & Answers

Get an output of lines in pattern 1st line then 10th line then 11th line then 20th line and so on.

Input file: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 (6 Replies)
Discussion started by: Sagar Singh
6 Replies

9. UNIX for Beginners Questions & Answers

Reading a file line by line and print required lines based on pattern

Hi All, i want to write a shell script read below file line by line and want to exclude the lines which contains empty value for MOUNTPOINT field. i am using centos 7 Operating system. want to read below file. # cat /tmp/d5 NAME="/dev/sda" TYPE="disk" SIZE="60G" OWNER="root"... (4 Replies)
Discussion started by: balu1234
4 Replies

10. Shell Programming and Scripting

Echo print on same line while loop using variable

Currently using below script but echo it print the output in two line. Input file all-vm-final-2.txt CEALA08893 SDDC_SCUN DS_SIO_Workload_SAPUI_UAT_01 4 CEALA09546 SDDC_SCUN DS-SIO-PD5_Workload_UAT_SP1_Flash_07 4 CEALA09702 SDDC_SCUN DS-VSAN-RMP-WORKLOAD01 4 DEALA08762 SDDC_LDC... (3 Replies)
Discussion started by: ranjancom2000
3 Replies
Date::Manip::DM5abbrevs(3pm)				User Contributed Perl Documentation			      Date::Manip::DM5abbrevs(3pm)

NAME
Date::Manip::DM5abbrevs - A list of all timezone abbreviations SYNPOSIS
This module is not intended to be used directly. Date::Manip 5.xx will load it as needed. This module contains all of the time zone abbrevations from Date::Manip 6.xx copied backwards to 5.xx to provide slightly better support for time zones. Note that this is only a bandaid fix, and does not add proper time zone handling to version 5.xx . TIMEZONES
The following timezones are defined: A -0100 ACDT +1030 ACST -0400 ACT -0500 ADDT -0200 ADT -0300 AEDT +1100 AEST +1000 AFT +0430 AHDT -0900 AHST -1000 AKDT -0800 AKST -0900 AKTST +0600 AKTT +0500 ALMST +0700 ALMT +0600 AMST -0300 AMT -0400 ANAST +1200 ANAT +1200 ANT -0430 APT -0300 AQTST +0500 AQTT +0500 ARST -0200 ART -0300 ASHST +0500 ASHT +0400 AST -0400 AT -0200 AWST +0800 AWT -0300 AZOMT +0000 AZOST +0000 AZOT -0100 AZST +0500 AZT +0400 B -0200 BAKST +0400 BAKT +0400 BDST +0700 BDT +0600 BEAT +0230 BEAUT +0245 BNT +0800 BORT +0800 BORTST +0820 BOT -0400 BRST -0200 BRT -0300 BST +0100 BT +0300 BTT +0600 BURT +0630 C -0300 CADT +1030 CANT -0100 CAPT -0900 CAST +1100 CAT +0200 CAWT -0900 CCT +0630 CDDT -0400 CDT -0500 CEMT +0300 CEST +0200 CET +0100 CGST -0100 CGT -0200 CHADT +1345 CHAST +1245 CHAT +0830 CHDT -0530 CHOST +1000 CHOT +0800 CHST +1000 CHUT +1000 CIT +0800 CJT +0900 CKHST -0930 CKT -1000 CLDT -0300 CLST -0300 CLT -0400 CMT +0155 COST -0400 COT -0500 CPT -0500 CST -0600 CUT +0220 CVST -0100 CVT -0100 CWST +0845 CWT -0500 CXT +0700 D -0400 DACT +0600 DAVT +0500 DDUT +1000 DUSST +0600 DUST +0600 E -0500 EADT +1100 EASST -0500 EAST -0600 EAT +0300 ECT -0500 EDDT -0300 EDT -0400 EEST +0300 EET +0200 EETDST +0300 EETEDT +0300 EGST +0000 EGT -0100 EHDT -0430 EIT +0900 EPT -0400 EST -0500 EWT -0400 F -0600 FET +0300 FJST +1300 FJT +1200 FKST -0300 FKT -0400 FMT -0053 FNST -0100 FNT -0200 FORT +0500 FRUST +0600 FRUT +0600 FST +0200 FWT +0100 G -0700 GALT -0600 GAMT -0900 GB +0100 GBGT -0345 GEST +0400 GET +0400 GFT -0300 GHST +0020 GILT +1200 GMT +0000 GMT+1 +0100 GMT+10 +1000 GMT+11 +1100 GMT+12 +1200 GMT+2 +0200 GMT+3 +0300 GMT+4 +0400 GMT+5 +0500 GMT+6 +0600 GMT+7 +0700 GMT+8 +0800 GMT+9 +0900 GMT-1 -0100 GMT-10 -1000 GMT-11 -1100 GMT-12 -1200 GMT-13 -1300 GMT-14 -1400 GMT-2 -0200 GMT-3 -0300 GMT-4 -0400 GMT-5 -0500 GMT-6 -0600 GMT-7 -0700 GMT-8 -0800 GMT-9 -0900 GST -0200 GYT -0400 H -0800 HADT -0900 HAST -1000 HDT -0930 HKST +0900 HKT +0800 HOVST +0800 HOVT +0700 HST -1000 I -0900 ICT +0700 IDDT +0400 IDLE +1200 IDLW -1200 IDT +0300 IHST +0600 IOT +0600 IRDT +0430 IRKST +0900 IRKT +0900 IRST +0330 ISST +0000 IST +0200 IT +0330 JAVT +0720 JDT +1000 JST +0900 K -1000 KART +0500 KAST +0500 KDT +1000 KGST +0600 KGT +0600 KIZST +0600 KIZT +0500 KOST +1100 KRAST +0800 KRAT +0800 KST +0900 KUYST +0300 KUYT +0300 KWAT -1200 L -1100 LHST +1100 LINT +1400 LKT +0600 LONT +0700 M -1200 MADMT +0100 MADST +0000 MADT -0100 MAGST +1200 MAGT +1200 MALST +0720 MALT +0730 MART -0930 MAWT +0500 MDDT -0500 MDT -0600 MEST -0800 MESZ +0200 MET +0100 METDST +0200 MEWT +0100 MEZ +0100 MHT +1200 MIST +1100 MMT +0630 MOST +0900 MOT +0800 MPT +1000 MSD +0400 MSK +0400 MST -0700 MUST +0500 MUT +0400 MVT +0500 MWT -0600 MYT +0800 N +0100 NCST +1200 NCT +1100 NDDT -0130 NDT -0230 NEGT -0330 NEST +0120 NET +0020 NFT +1130 NMT +1112 NOVST +0700 NOVT +0700 NPT +0545 NRT +1200 NST -0330 NT -1100 NUT -1100 NWT -1000 NZDT +1300 NZMT +1130 NZST +1200 NZT +1200 O +0200 OMSST +0700 OMST +0700 ORAST +0500 ORAT +0500 P +0300 PDDT -0600 PDT -0700 PEST -0400 PET -0500 PETST +1200 PETT +1200 PGT +1000 PHOT +1300 PHST +0900 PHT +0800 PKST +0600 PKT +0500 PMDT -0200 PMST -0300 PMT +1000 PNT -0830 PONT +1100 PPMT -0449 PPT -0700 PST -0800 PWT +0900 PYST -0300 PYT -0400 Q +0400 QMT -0514 QYZST +0700 QYZT +0600 R +0500 RET +0400 ROK +0900 ROTT -0300 S +0600 SAKST +1100 SAKT +1100 SAMST +0400 SAMT +0400 SAST +0200 SAT -0400 SBT +1100 SCT +0400 SDMT -0440 SGT +0800 SHEST +0600 SHET +0500 SLST +0100 SMT +0216 SRT -0300 SST -1100 STAT +0400 SVEST +0500 SVET +0400 SWAT +0130 SWT +0100 SYOT +0300 T +0700 TAHT -1000 TASST +0600 TAST +0600 TBIST +0400 TBIT +0400 TFT +0500 TJT +0500 TKT +1400 TLT +0900 TMT +0500 TOST +1400 TOT +1300 TRST +0400 TRT +0300 TSAT +0300 TVT +1200 U +0800 ULAST +0900 ULAT +0800 URAST +0500 URAT +0400 URUT +0600 UT +0000 UTC +0000 UYHST -0230 UYST -0200 UYT -0300 UZST +0600 UZT +0500 V +0900 VET -0430 VLASST +1000 VLAST +1100 VLAT +1100 VOLST +0400 VOLT +0400 VOST +0600 VUST +1200 VUT +1100 W +1000 WAKT +1200 WARST -0300 WART -0400 WAST +0200 WAT +0100 WEMT +0200 WEST +0100 WET +0000 WFT +1200 WGST -0200 WGT -0300 WIT +0700 WMT +0124 WSDT +1400 WST +0800 X +1100 Y +1200 YAKST +1000 YAKT +1000 YDDT -0700 YDT -0800 YEKST +0600 YEKT +0600 YERST +0400 YERT +0400 YPT -0800 YST -0900 YWT -0800 Z +0000 ZP4 +0400 ZP5 +0500 ZP6 +0600 LICENSE
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself. AUTHOR
Sullivan Beck (sbeck@cpan.org) perl v5.14.2 2012-06-02 Date::Manip::DM5abbrevs(3pm)
All times are GMT -4. The time now is 09:27 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy