|
sort question I am trying to sort a file that looks like this: Glory(a)hipmail.com Goodsites8310(a)email.com Goodsites8312(a)email.com goody(a)yahoo.com I would like to sort on the characters after the @ the output will look this: Goodsites8310(a)email.com Goodsites8312(a)email.com Glory(a)hipmail.com goody(a)yahoo.com thank you... 9 Jun 2006 00:39
Getting the greatest number How could I get the greatest number in a file ? Example: cat file1 55 82 34 18 61 # cat file1 | ./gn 82 Thanks ! ... 7 Jun 2006 21:01
Manipulating non printable characters Is it possible to send specific byte sequences from the shell command line to a file? Imagine I want to dump into a file the following byte sequence 04 11 32 7e 08 27 66 13 where each two digit group is the ASCII hex representation of a character. The problem is in the nonprintable characters. How can they b... 19 May 2006 19:07
help with sort syntax Hi all, the syntax of the SORT command id baffling me :-(( I'm trying to sort this flat file by two "absolute" positions. That is: I would like to sort it by the 9-th column (the one containing '9' '5' '5' '5') and THEN by the 13-th column ( '3' '7' '4' '1') 1234567890123456789 zzzzzz 5a 6781.... zzz zz 5z... 18 May 2006 19:50
egrep not working the text file looks like this ----------- file1--------- hello, this is line1 ANS3234E this line should get grep(ed) this is the last line -----------end file1---- why don't the following commands grep the 2nd line out of the above file. Err="AN(R|S)[0-9]{4}(E|K|S)" egrep $Err file1 thanks in advan... 5 May 2006 13:35
join command Hi. How do you join 2 files in unix using join command? we can do like this, cant we? file1: file2: 1 yellow 1 fire 2 white 3 water 3 blue 2 air and get this result: 1 yellow fire 2 white air 3 blue wat... 3 May 2006 13:43
export var in case statement Can someone please tell me you this case statement is not exporting my environment variables? #!/usr/bin/ksh if [ $# -ne 2 ] then echo echo Usage: \. setdb.sh SID VERS echo exit 1 fi ORACLE_SID=$1 ORACLE_VERS=$2 case "$ORACLE_VERS" in '9.... 6 Apr 2006 13:19
variable passing to function in ksh Hi All, ---------------------------- #!/usr/bin/ksh echo_fun1() { case $1 in 1) echo "First : $2" ;; 2) echo "Second" ;; *) echo... 30 Mar 2006 14:14
inserting text into files I'm trying to write a unix shell script that will prompt the user for text and insert that text in the middle of certain lines of a file. For example: I have file that looks like: ---------------------------------- blahblahblah blahblah blah:dk:sdf:: asdf:::: ::adf:: adf:::asdf: -----------------------------... 28 Apr 2006 09:51
Add a line with sed Hi Guys, I need to add a line to a file, 2nd from the top. What would be the easist way. Thanks, ... 24 Mar 2006 09:59 |