Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Sed Command in Unix
Name: Vj Date: November 9, 2004 at 12:15:38 Pacific OS: HP Unix CPU/Ram: NA
Comment:
Can anyone explain me what does the sed command do in the following shell script? I came across this in one of the shell acripts. The output of a SQL session is piped into it
sqlplus -s user/pass@db <<EOF set heading off feedback off serveroutput on select query_id, query_db_to_run,query_text from test where rownum = 1; exit; EOF ) | sed -e '/^$/d' -e 's/^[ ][ ]*/ /' | read v_query_id v_query_db_to_run v_query_text
Summary: Hi: This sed command contains two edits: '/^$/d' this deletes all blank lines 's/^[][]*/ /' for each line, replace all leading spaces with one space. ...
Summary: Hi We have an old Unix system and we are looking at CROMTAB. A command in it says > /usr/lib/sa/sa2 -s 8:00 -e 18:01 -I 1200 -A. Can anyone tell us what this command is doing. Thank you, Sandra King ...
Summary: Jim, we actually have an executable file which is called sw_print(this uses DOS for openin binary files) sw_print.exe binary_file /d1 /f5 /z1 ..we use it for opening these binary files on WINDOWS...