![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Is there a awk solution for this?? | timj123 | Shell Programming and Scripting | 7 | 03-14-2008 06:28 AM |
| Is There a Sed Solution for This? | racbern | Shell Programming and Scripting | 1 | 03-13-2008 11:31 AM |
| Grep solution | Amruta Pitkar | Shell Programming and Scripting | 3 | 05-03-2007 02:57 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
need solution for scripting
hi all,
i would like to add on the print command to prompt user to enter a value and store inside the variable name as $inName after that the value will replace the existing line for ${METRICA_DIR}/TechnologyPacks/Spool/2030324032 i'm new in scripting, could anyone give me some hint for sripting? tmpfile=/tmp/tmpfile.$$ for file in loaderconfiguration*.xml do sed 's|${METRICA_DIR}/TechnologyPacks/Spool/2030324032|$inName|g' $file > $tmpfile mv $tmpfile $file done thanks |
|
||||
|
Shell Programming
Hi,
Iam new to Shell programming and i want to Display the same lines in a file which is appearing more than once. Here is a file format, WERTFRT|1234567890 ASDFFGU|1230986545 WERTFRT|1234567890 CVBNMKL|7685645385 Here 1st and 3rd lines are same and i need to select and write it in to seperate file. please help me. Thanks in advance. |
|
||||
|
Quote:
i wanted add on such like print "what is your directory : "; then the answer is storing to &inName and the sed will replace the &inName to ${METRICA_DIR}/TechnologyPacks/Spool/2030324032 sed 's|${METRICA_DIR}/TechnologyPacks/Spool/2030324032|$inName|g' $file Thanks in advance |
|
||||
|
Hi KKC,
summer_cherry was asking you to replace the single codes in the sed command with double codes. Code:
sed "s|${METRICA_DIR}/TechnologyPacks/Spool/2030324032|$inName|g" $file
Thanks, Karthikeyan. ========== |
|
||||
|
Quote:
thanks for the advise~, what is the different withe replace the single codes in the sed command with double codes?![]() many thanks |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|