07-29-2011
created a zero byte file
the above statment doesn't work
it creates a zero byte file
it a little bit urgent
can someone help
Last edited by er_zeeshan05; 07-29-2011 at 11:23 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a loop in a script that is given me an error but, when I do it on the command line it works perfectly. The sed statement has to use the variables from a file so the file is partitioned correctly. I am running on HP:
<Begin error>:
+ cat /u01/bteam/CNAM/1121/.partition
+ read line
+ +... (3 Replies)
Discussion started by: bthomas
3 Replies
2. UNIX for Dummies Questions & Answers
Can anyone tell me ...on the below listed command
cat /mnt/winbox/list_measurement/ds1c/ds1_f.rome_27A03A 2>> error_log | sed -e '1,3d;s/^/27A03A,/' | sed -e "s#\(.*\)#\1 ,$(date +%Y-%m-%d)#g" > /SBS/ds1_f.rome_27A03A
The outcome is this:
,2005-08-29 Forestdale,3:02 am MON AUG 29,... (9 Replies)
Discussion started by: Redg
9 Replies
3. Shell Programming and Scripting
Execution of the following segment is giving the error -
Script extract:-
OUT=$DATADIR/sol_rsult_orphn.bcp
TMP1=${OUT}_tmp1
TMP=${OUT}_tmp
( isql -w 400 $dbConnect_OPR <<EOF
select convert(char(10), s.lead_id)
+'|'
+ s.pho_loc_type,
";",
s.sol_rsult_cmnt,
";",
+'|'+ s.del_ind... (3 Replies)
Discussion started by: kzmatam
3 Replies
4. Shell Programming and Scripting
Can someone help me "port" this to AIX sed?
sed '/nas/{n;s/true/false/}'
I know it doesn't like the ; but i don't know how else to do it.... never had to sed on an AIX box :D (7 Replies)
Discussion started by: DeviousPete
7 Replies
5. Shell Programming and Scripting
Hi All
I'm getting this error while executing a sed script
sed: 0602-404 Function /</ i\ File from New Cube: cannot be parsed.
sed "/</ i\ File from New Cube:
/>/ i\ File from Old Cube:" difference1.txt > Difference.txt
I've a file like this
< Y2008 Dec ..... .... ... 345
I want... (6 Replies)
Discussion started by: Celvin VK
6 Replies
6. Shell Programming and Scripting
Hello ,
I am trying to replace a word :: complete to Failed .
work: complete
Sed command which i am using is given below ::
sed s/work: complete/Failed/g temp1.txt > temp2.txt (Sed command is grabled if i use the above .. because of space which is there between work: and complete. I... (6 Replies)
Discussion started by: raghav1982
6 Replies
7. Shell Programming and Scripting
Hi,
I am trying to use 3 sed statements in a shell script, but it get foll error.
sed : garbage after command.
If I use only two sed statements, the script works well.
Is there any restriction for sed usage or is there some catch which I am missing.
Sample Script is as follows :
... (3 Replies)
Discussion started by: sameersalve
3 Replies
8. Shell Programming and Scripting
Hi guys. Can somone advise as to what the problem is with the following sed command?
1) read -p "Please enter new username you wish to replace old: " new_username
sed "s/$username/$new_username/" information_file
;;
This is one of the case statements included but I'm... (1 Reply)
Discussion started by: jjb1989
1 Replies
9. Shell Programming and Scripting
I can't get this code to work, could I get some help...
sed -i '' "s:${shLogpath1}${cell}:${shLogpath2}${cell}:g" test.txt
Any Ideas, I think I need to separate the variables some how? (2 Replies)
Discussion started by: digitalviking
2 Replies
10. Shell Programming and Scripting
I'm trying to change a date in a couple of large files using SED. The problem is when I use the -n parameter, it doesn't actually change the file. When I leave out the -n, it sends the whole file to the screen, but it does appear to change it.
The problem is, these files are very large and it... (8 Replies)
Discussion started by: Drenhead
8 Replies
LEARN ABOUT OSF1
swap_words
swap_lw_bytes(9r) swap_lw_bytes(9r)
NAME
swap_lw_bytes, swap_word_bytes, swap_words - General: Perform byte-swapping operations
SYNOPSIS
unsigned int swap_lw_bytes(
unsigned int buffer ); unsigned int swap_word_bytes(
unsigned int buffer ); unsigned int swap_words(
unsigned int buffer );
ARGUMENTS
Specifies a 32-bit (4 bytes) quantity.
DESCRIPTION
The swap_lw_bytes interface performs a longword byte swap. The swap_word_bytes interface performs a short word byte swap. The swap_words
interface performs a word byte swap. Many computer vendors support devices that use a big endian model of byte ordering. Because Digital
devices support the little endian model of byte ordering, there is a need for these byte-swapping interfaces. In addition, some buses (for
example, the VMEbus) can have specific or implied byte ordering that may require the use of these interfaces.
Given that a longword is equal to 4 bytes; a short word is equal to 2 bytes; and 1 byte is equal to 8 bits, these interfaces swap bytes as
follows: The swap_lw_bytes interface takes the 32-bit quantity specified by the buffer argument and swaps all 4 bytes. The swap_word_bytes
interface takes the 32-bit quantity specified by the buffer argument and swaps the individual bytes that make up each word of the 32-bit
quantity. The swap_words interface takes the 32-bit quantity specified by the buffer argument and swaps the two 16-bit words.
The following illustration compares the byte swapping performed by these interfaces.
31 0
+---+---+---+---+ Starting value: | a | b | c | d |
+---+---+---+---+
Long word byte swap
(swap_lw_bytes)
31 0
+---+---+---+---+ Ending value: | d | c | b | a |
+-------+---+---+
Short word byte swap
(swap_word_bytes)
31 0
+---+---+---+---+ Ending value: | b | a | d | c |
+---+---+---+---+
31 0
+---+---+---+---+ Starting value: | ab | cd |
+---+---+---+---+
Word byte swap
(swap_words)
31 0
+---+---+---+---+ Ending value: | cd | ab |
+---+---+---+---+
RETURN VALUES
Upon successful completion, these interfaces return the swapped bytes.
swap_lw_bytes(9r)