Sponsored Content
Top Forums Shell Programming and Scripting strange: sed and awk print at end instead of begin of line Post 302565475 by regisl67 on Tuesday 18th of October 2011 12:10:04 PM
Old 10-18-2011
It must be a problem with my Ubuntu-installation at home:
I tried in the office on a Redhat system: works as expected, no problem!

$ od -bc myfile does NOT show any \r in the output.
However, I'll give a try with dos2unix when I'm back at home.

Thank you for your help! I appreciate to learn from all these answers!

---------- Post updated at 06:10 PM ---------- Previous update was at 09:50 AM ----------

On the office-Linux (Redhat), od -bc didn't show any \r ,
but at home, there where a lot of this characters.

$ dos2unix resolved this problem.

Thank you very much!

Kind regards - Regis
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Urgent! Sed/Awk Filter Find Pattern Delete Till End Of Line

Hi, I need help with using an awk or sed filter on the below line ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE Look for... (2 Replies)
Discussion started by: rajan_san
2 Replies

2. UNIX for Advanced & Expert Users

Urgent Help required : awk/sed help to find pattern and delete till end of line

Hi, I need help with using an awk or sed filter on the below line ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE Look for... (1 Reply)
Discussion started by: rajan_san
1 Replies

3. Shell Programming and Scripting

awk BEGIN END and string matching problem

Hi, Contents of BBS-list file: foo foo foo awk ' BEGIN { print "Analysis of \"foo\"" } /foo/ { ++n } END { print "\"foo\" appears", n, "times." }' BBS-list Output: Analysis of "foo" "foo" appears 3 times. awk ' (3 Replies)
Discussion started by: cola
3 Replies

4. Shell Programming and Scripting

Use of Begin IF ,END IF END not working in the sql script

Hi I have written a script .The script runs properly if i write sql queries .But if i use PLSQL commands of BEGIN if end if , end ,then on running the script the comamds are getting printed on the prompt . Ex :temp.sql After connecting to the databse at the sql prompt i type... (1 Reply)
Discussion started by: isha_1
1 Replies

5. Shell Programming and Scripting

awk one liner to print to end of line

Given: 1,2,whatever,a,940,sot how can i print from one particular field to the end of line? awk -F"," '{print $2 - endofline}' the delimiter just happens to be a comma "," in this case. in other cases, it could be hypens: 1---2---whatever---a---940---sot (4 Replies)
Discussion started by: SkySmart
4 Replies

6. Fedora

Shell Script - awk, begin, for and print

pointsb=`awk -v a2="$a2" -v b2="$b2" -v c2="$c2" -v yb="$yb" -v yc="$yc" \ 'BEGIN { for (y=yc; y<=yb; y++) { x = a2*y*y+b2*y+c2; print x, y }; }'` I am learning shell script. I was reading a script and got confused in this line. I understood that awk is allowing to assign the variable. But... (10 Replies)
Discussion started by: agriz
10 Replies

7. Shell Programming and Scripting

Begin/End blocks in awk: confused

I am trying to understand how to use the END block in awk without much success. I have this script that I found: gawk '{count++; keyword = $1} if (count == 3) keyword = "order this" else print keyword " " k } }' << orderfile Is that the way that the END block should be used? I am... (6 Replies)
Discussion started by: newbie2010
6 Replies

8. Shell Programming and Scripting

BEGIN and END format in awk

I'm new to awk, trying to understand the basics. I'm trying to reset the counter everytime the program gets a new file to check. I figured in the BEGIN part it would work, but it doesn't. #!/bin/awk -f BEGIN {counter=0} { sum=0 for ( i=1; i<=NF;... (1 Reply)
Discussion started by: guitarist684
1 Replies

9. Shell Programming and Scripting

sed - remove begin of line up to the third and including occurence of character

hello. How to remove all characters in a line from first character ( a $ ) until and including the third occurrence of that character ( $ ). Any help is welcome. (10 Replies)
Discussion started by: jcdole
10 Replies

10. Shell Programming and Scripting

awk to print the string between 3rd and 4th backslashs to end of line

im trying to get awk to print the string between 3rd and 4th backslashs to end of line test could be any word this http://example.com/test/ >to this http://example.com/test/ > testalso the other way round insert string at end of line... (13 Replies)
Discussion started by: bob123
13 Replies
GSF-OFFICE-THUMBNAILER(1)					       GNOME						 GSF-OFFICE-THUMBNAILER(1)

NAME
gsf-office-thumbnailer - office files thumbnailer for the GNOME desktop SYNOPSIS
gsf-office-thumbnailer [OPTIONS] infile outfile DESCRIPTION
This manual page briefly documents the gsf-office-thumbnailer command. gsf-office-thumbnailer is used internally by GNOME applications such as nautilus to generate thumbnails of several types of office applica- tion files. While it is possible to invoke it manually, it is usually invoked automatically by nautilus. OPTIONS
This program follows the usual GNU command line syntax, with single letter options starting with a single dash (`-') and longer options starting with two dashes (`--'). Main options -i, --input=filename Name of file for which to create a thumbnail -o, --output=filename Name of the file in which to store the thumbnail -s, --size=N Size of thumbnail in pixels; the thumbnail will be at most N*N pixels large. Help options -?, --help Display a brief usage message LICENSE
gsf-office-thumbnailer is licensed under the terms of version 2.1 of the GNU Lesser General Public License (LGPL) as published by the Free Software Foundation. For information on this license look at the source code that came with the software or see the GNU project page <http://www.gnu.org/>. AUTHOR
gsf-office-thumbnailer's primary author is Federico Mena-Quintero <federico@novell.com>. The initial version of this manpage was written by J.H.M. Dassen (Ray) <jdassen@debian.org>. gsf August 17, 2005 GSF-OFFICE-THUMBNAILER(1)
All times are GMT -4. The time now is 07:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy