Summary: Hi I am using sed in a shell script. I am having problems in using parameters in sed for search and replace. TEST=`grep "'/" source | head -1` sed s/...
Summary: Hi, Anyone know a way to use parameters in a sed or a way round it?? I'm trying to do something like this: sed 's/${USER}/${NEW_USER}/g' but it does n...
Summary: You are attempting to implement a replacement in sed. Arnold Robbins implemented a sed version in his "Sed & Awk" book published by O'Reilly. He call...
Summary: Hi Folks, In sed and/or awk, how would I formulate an if/else logic to skip a command if a specific text already exist in a file? I am getting multip...
Summary: Hi I would like to create a script that will prompt a user to change a parameter in the script before executing for eg: /usr/snapshot-efb/snapshot -i...
Summary: hi... i want to know how can i take away a portion of a file using sed..if i have 100 records in a file , i want to take away 10 records and place it ...
Summary: Jean-Pierre: I'm not sure what I'm doing wrong, but it doesn't work out for me... The data file ... [comp%] cat test1.dat data before 1245 strcpy(proc...
Summary: I currently have an awk that removes all new lines and works fine, but I'd like to do it in a sed file since everything else is happeing in the sed f...
Summary: Yes, that code eliminates empty (null) lines. For each null line encountered, it pulls the next line into the pattern space (main work buffer), then ...
Summary: It looks like this problem is solved easily enough with a tool that allows processing a line at a time - such as awk or perl. However, I think sed is ...
Summary: I'm using sed.i.e search for pattern and then do the replace. I want to replace 5657 with 10000 in lines which have the pattern /xyz/data. I will be p...
Summary: Hi all, I'm new to UNIX, so my knowledge is still quite limited. This might therefore be a bit of a dumb question. I am running jobs in parallel from ...
Summary: Hi, I need an urgent help with a complex situation. I really appreciate your help! I have a parameter file like this. unix> cat script.par name=david ...
Summary: Hi Bill, this is easy in sed just sed -n '3p' fileA But it didn't realy delete the rows in fileA just print's the 3 row. So a redirection of the out p...
Summary: How folks, I've an odd situation, in sed if one wants to add a variable substitution to a sed appendage, for example: ------------------ P=456 sed "/1...
Summary: Hi (again), I obtain a file that contains the program's skeleton (the main instructions, namely calls & conditions) What I would like is to do recurs...
Summary: Hello All, I am trying to link a few csh scripts together via positional parameters. In the calling script, I assign 8 different variables to val...
Summary: Thanks, its greatly appreciated. I had to change the "print" to "echo" in the shell script and it worked fine, apart from inserting the current fil...
Summary: I am using a ksh script to parse/analyze some text files - files that have records that are over multiple lines. I have used sed and awk in the past; ...
Summary: In both of the scripts below, to prevent from losing my indentation, I use leading underscores instead of leading spaces, so you would need to change ...
Summary: correction: in sed 's/^\(P.\{21\}\)./\1 /' input_file \ are not "shell escapes", they are "sed escapes" so that sed will recognize them as special ch...
Summary: If you are using variables in sed, you must use double quotes instead of single: #!/bin/ksh name="Mike" newname="Michael" sed "s/$name/$newname/" add...
Summary: Hi, I'm trying to do the following :- rsh remote sed "s/ //g" remote_file >> local_file but I get :- sed: command garbled: s/ Now I know that sed "s/...