hi ,
m new to sed and awk. can anyone tell me how to alter the old file permanenetly using sed.
e.g.
$sed 's/cat/dog/g' old_file
the above command will replace all the occrance of cat by dog in the file called old_file and by default will show the output at stdout.
so is there anyway of... (2 Replies)
Made a sysback tape backup on our 595 running 4.1.5 but when trying to do a restore discovered that rmt0 not in bootlist(s).
Tried to alter both the normal and service bootlists but system wont respond to F7(commit).
Erased the service boolist then tried alter again, same result. Now have... (2 Replies)
I have some zip files. Every file has a "folder/xml file" inside it. Is there any way to change these zip files directly without unzipping them. I want to convert these zip files to "/xml file" (want to move the xml file/s one root up by removing the folder inside it.)
Ex:
-bash-3.00$ for file... (1 Reply)
Is there a way to alter the file descriptor for stdout.?
sample:
#!/bin/ksh
exec 1>file
exec 2>file
echo hi --------->This will go to file
print -u4 "come statement"---->I want to make the file descriptor 4 to point to stdout.
The reason is ,I have a script which has lot of db2... (1 Reply)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
My first question pertains to the adding a book section, I'm unsure which command or conditional statement I... (0 Replies)
Say I have a stream and want to get MD5 from it, without altering it. I won't know how big the stream is or how much time it will take to close. Here is the idea:
cat somefile | calculate md5 and put it somewhere | bzip2 > somefile.bz2 (5 Replies)
Thank u so much .Its working fine as expected.
---------- Post updated at 03:41 PM ---------- Previous update was at 01:46 PM ----------
I need one more help.
I have another file(fixed length) that will get negative value (ex:-00000000003000) in postion (98 - 112) then i have to... (6 Replies)
I have this script:
#!/bin/sh
for file in "$@"
do
ext=${file##*.}
base=${file%.*}
num=${base##*v}
zeroes=${num%%*}
num=${num#$zeroes} #remove leading zeros, or it uses octal
num=$((num+1))
base=${base%v*}
new=$(printf... (4 Replies)