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: A partial reply... This will remove the NL character. sed 'N;s/\n//' datafile therefore 1234567890 1234567890 becomes 12345678901234567890 This will p...
Summary: Hi All, I have a question on how regular expressions evaluate. I have the following regular expression that I use in SED: echo hello world abac hello...
Summary: I need help on writing 2 shell scripts: 1) Write a shell script, to be called `keep', that will take any number of file names as arguments. It sho...
Summary: I am writing a phone list utility. I want to ask the user for a name and number that they will input from the command line. I will then take this data...
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: this should be real easy. i'm in korn shell. i have a data file similar to this 2489,02-Aug-1998 00:00:00,14,32,0,49,08-Aug-1998 00:00:00 2490,03-Aug-...
Summary: Here is my solution, with caveats at the end. This code works on HP-UX in the bourne or korn shell. I tested with an actual download of the web file, ...
Summary: Well if there's no white space in your records it's easy to preserve the order: cat -n file | sed 's/\(.*\t\)\(.\{8\}\)\(.*\)/\1\3\t\2/' | sort -k3 | ...
Summary: Hi I need a sed command to replace all characters in a text file except those in a specific range. i.e If there is a file with contents: abcdefghijk w...
Summary: Well, perl is quite an overkill for a task that can be done easily with basic unix. And not all shops have perl installed. #!/bin/sh cat mylist.txt |...
Summary: I was wondering if you could help me with a script to remove ALL the lines in a file that are loger then 255 char. This script must also remove the li...
Summary: Hi, I would like to delete the files in the list below. The file list is over 5000 lines long. It looks something like this: test.12001 test.12002 tes...
Summary: Hi all, I'm writing a shell script to execute PGP, then FTP to several FTP site at the same time. Please let me know how to put in the script so that...
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: Remove all the commands that need to be run as oracle and place them in a different script, say called ora_commands.sh In your main script, when you g...
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: Please assist. I would like to be able to completely format my hard drive. When I use dos it does not remove the LILO boot loader. If anyone knows ho...
Summary: There are some things here that can stand some clarification and warnings ... The vi and sed solutions above will remove ALL leading spaces on each li...
Summary: Hi I need help with sed , i figured out how to use it but i need a way for it to remove "." and "/" like in this example SRC="../../../xxxxxxx/xxxx a...
Summary: Can anyone please help me with this. I am having a customers bank account file which has several records of the following pattern, colon is the delimi...