This is a discussion on SED pass a output line to another within the Shell scripting forums, part of the Development/Scripting category; Iam new her I have a line "acadc_dri_DC.c", line 237: [F108] 'LastPwmM' undefined and i like it to be acadc_dri_DC.c(237): ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
Iam new her I have a line "acadc_dri_DC.c", line 237: [F108] 'LastPwmM' undefined and i like it to be acadc_dri_DC.c(237): error [F108]: 'LastPwmM' undefined But i newer used sed so wat to do. |
| Sponsored Links | ||
|
|
|
||||
|
How many lines do you have? You can replace single line with something as follows:
Code:
echo \"acadc_dri_DC.c\", line 237: [F108] \'LastPwmM\' undefined | sed 's/\"//g'
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
|
||||
|
Well it is not diff task but it need some understanding
Code:
echo "acadc_dri_DC.c", line 237: [F108] 'LastPwmM' undefined | sed 's/"//g' | sed 's/,//' |sed 's/line/(/g' | sed 's/:/):/' | sed 's/:/: error/' | sed 's/\]/\]:/'
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
|
|||
|
Tangs.
But.... my command ar @timake.exe %1 %2 %3 %4 %5 %6 2>&1| sed "s/"//g" | sed "s/,//" | sed "s/line/(/g" | sed "s/:/):/" | sed "s/:/: error/" | sed "s/\]/\]:/" And iam using GNU sed version 4.0.7 and WinXP Pro I replased sed 's/"//g" with sed "s/"//g" else i get sed: -e expression #1, char 1: Unknown command: `'' And the i get sed: -e expression #1, char 7: Unknown option to `s' As I understand "s/"//g" surge alle " and replase the with blank? and so on. |
|
||||
|
Well I have tested it on my UNIX box and it is working fine. I dunoo what's wrong with Win XP sed command. Never used sed on XP.
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HPUX Unix comparing 2 large files line by line | raj | HP-UX | 1 | 02-11-2008 06:20 PM |
| Omit the first line in a file | c341 | Shell scripting | 4 | 12-29-2006 03:07 PM |
| user pass word | sparky | Shell scripting | 1 | 06-26-2006 08:19 PM |
| How to pass shell variable to awk program | Shell scripting | 4 | 06-23-2006 06:11 AM | |
| for do loop in solaris one line | Solaris/OpenSolaris | 1 | 01-09-2006 02:35 PM | |