Sponsored Content
Full Discussion: Help understanding sed
Top Forums UNIX for Dummies Questions & Answers Help understanding sed Post 302358134 by Makaer on Thursday 1st of October 2009 11:55:26 AM
Old 10-01-2009
Thank you. That works perfectly!

Sorry I missread the >> appends!

Thanks for all your help.
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

need further understanding of init.d

I needt o know how what init.d does and how it knows which dameons/applications to turn off and how to restart the applications after reboot. any OS - solaris/hp-ux (1 Reply)
Discussion started by: jigarlakhani
1 Replies

2. Shell Programming and Scripting

understanding the sed command

Guys, I am trying to understand the sed command here. adx001 $ a=/clocal/dctrdata/user/dctrdat1/trdroot/recouncil adx001 $ b=`echo $a | sed 's/\//\\\\\//g'` adx001 $ echo $b \/clocal\/dctrdata\/user\/dctrdat1\/trdroot\/recouncil The sed command i took it from the script. Please... (3 Replies)
Discussion started by: mac4rfree
3 Replies

3. Shell Programming and Scripting

need help understanding mv

I just started shell coding and I'm a bit confused on how 'mv' works can someone explain to me how it works and if i did this correctly. Thanks. echo "Enter Name of the first file:" read file1 #echo $file1 if ; then echo "Sorry, file does not exist." exit 1 ... (16 Replies)
Discussion started by: taiL
16 Replies

4. UNIX for Dummies Questions & Answers

understanding {%/*}/

Hi Gurus: I am trying to understand the following line of code.I did enough of googling to understand but no luck.Please help me understand the follow chunk of code: X=$0 MOD=${X%/*}/env.ksh X is the current script from which I am trying to execute. Say if X=test.ksh $MOD is echoing :... (3 Replies)
Discussion started by: vemana
3 Replies

5. UNIX for Dummies Questions & Answers

understanding sed command

Hi Friends, I need a small help in understanding the below sed command. $ cat t4.txt 1 root 1 58 0 888K 368K sleep 4:06 0.00% init 1 root 1 58 0 888K 368K sleep 4:06 0.00% init last $ sed 's/*$//' t4.txt 1 root 1 58 0 888K ... (3 Replies)
Discussion started by: forroughuse
3 Replies

6. Shell Programming and Scripting

help understanding regex with grep & sed

I have the following line of code that works wonders. I just don't completely understand it as I am just starting to learn regex. Can you help me understand exactly what is happening here? find . -type f | grep -v '^\.$' | sed 's!\.\/!!' (4 Replies)
Discussion started by: trogdortheburni
4 Replies

7. Shell Programming and Scripting

Understanding sed

Hi, can some one suggest me,how "sed" is managed to delete the second field here. Any explanation on , how the below code is working would be appreciated. sed 's/^\(*\)::/\1::/' /etc/passwd sed 's/*:/:/2' /etc/passwd (14 Replies)
Discussion started by: panyam
14 Replies

8. Shell Programming and Scripting

Need your help in understanding this

Hi, I found this in a script and I would like to know how this works Code is here: # var1=PART1_PART2 # var2=${var1##*_} # echo $var2 PART2 I'm wondering how ##* makes the Shell to understand to pick up the last value from the given. (2 Replies)
Discussion started by: sathyaonnuix
2 Replies

9. Shell Programming and Scripting

Need Quick help on Understanding sed Regex

Hi Guys, Could you please kindly explain what exactly the below SED command will do ? I am quite confused and i assumed that, sed 's/*$/ /' 1. It will remove tab and extra spaces .. with single space. The issue is if it is removing tab then it should be Î right .. please assist.... (3 Replies)
Discussion started by: Nandy
3 Replies
DwtCStrcat(3Dwt)														  DwtCStrcat(3Dwt)

Name
       DwtCStrcat, DwtCStrncat - Appends a copy of a compound-string to the end of another compound-string.

Syntax
       DwtCompString DwtCStrcat(compound_string1,
				  compound_string2)
	    DwtCompString compound_string1,  compound_string2;

       DwtCompString DwtCStrncat(compound_string1,
				  compound_string2,
				  num_chars)
	    DwtCompString compound_string1,  compound_string2;
	    int num_chars;

Arguments
       compound_string1
		 Specifies a compound-string to which a copy of compound_string2 is appended.

       compound_string2
		 Specifies a compound-string that is appended to the end of compound_string1.

       num_chars Specifies the number of characters to be appended to the specified compound-string.  If num_chars is less than the length of com-
		 pound_string2, the resulting string will not be a valid compound-string.

Description
       The DwtCStrcat function appends compound_string2 to the end of compound_string1 and returns the resulting string.  The original strings are
       preserved.   The space for the resulting compound-string is allocated within the function.  After using this function, you should free this
       space by calling XtFree.

       The DwtCStrncat function appends no more than the number of characters specified in num_chars, which includes tag and  length  sections	of
       the compound-string.

Return Values
       These functions return a pointer to the resulting compound-string.

See Also
       Guide to the XUI Toolkit: C Language Binding
       Guide to the XUI Toolkit Intrinsics: C Language Binding

																  DwtCStrcat(3Dwt)
All times are GMT -4. The time now is 02:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy