Search Results

Search: Posts Made By: manishdivs
1,527
Posted By manishdivs
Thank you. sed '/EDI_DC40/n;/E2EDS01/n; ...'...
Thank you.

sed '/EDI_DC40/n;/E2EDS01/n; ...'
Getting error: "Unrecognized command: /EDI_DC40/n;/E2EDS01/n; ..."

sed -E '/EDI_DC40|E2EDS01/n; ...'
Getting error: "sed: illegal option -- E"
...
1,527
Posted By manishdivs
Hi, Thank you very much for your response....
Hi,

Thank you very much for your response. It worked like the way I wanted. Thanks.

Is there also a way if I can skip changing the lines starting with "EDI_DC40" OR "E2EDS01" instead of 1st and...
1,527
Posted By manishdivs
Replace characters at fixed positions
My objective is to replace the 8th, 9th, 10th characters by 1 space per character (total 3 spaces) in a file.

I achieved this using following command:
sed 's/\(.\)/\1@/7;s/@\(...\)/ /'...
4,430
Posted By manishdivs
bcp utility is not available in the system, so...
bcp utility is not available in the system, so trying find out some workaround.

Thank you.
4,430
Posted By manishdivs
Insert bulk values in DB table using isql
Hello,

Objective is to insert bulk values in DB table using isql.

Following code tried:
isql -SServer_name -Ddb_name -Uuser_name -Ppassword < file.txt

cat file.txt
for i in `cat...
1,716
Posted By manishdivs
Hello MadeInGermany, I kept inner for loop...
Hello MadeInGermany,

I kept inner for loop my mistake. I was initially planning to take backup of the files then forgot to remove it from there.
This is not a homework, I stuck in between writing...
1,716
Posted By manishdivs
Hello RudiC, I did try several option but...
Hello RudiC,

I did try several option but not getting success might be because I am not well versed with Unix.

I request you to please give me a separate command for reading the line beginning...
1,716
Posted By manishdivs
Hello RudiC, I am getting following error...
Hello RudiC,

I am getting following error message while using your code:
sed: 0602-404 Function /find/,/list/ {/;\|run/d; s/find/where/; s/ with /:/} cannot be parsed.

Thank you.
1,716
Posted By manishdivs
Removing specific lines from script files.
Hello,

Activity to perform:

1. Find all of the "*.tmp" files in a given user directory
2. Determine which ones have "find" in them.
3. Replace the "find sequence" of commands with a "list...
6,108
Posted By manishdivs
\t did not work with my sed. Following...
\t did not work with my sed.


Following options ran successfully:
sed "s/^[ ]*restoredb2=.*/#&\\ # [] consists of one SPACE & one TAB character.
restoredb2=$restoredb2_value # $comment/"...
1,631
Posted By manishdivs
If I understood your requirement correctly then...
If I understood your requirement correctly then it can be achieved using below scripts:

cat yourScript.sh

#!/bin/ksh

YTEXT="Do you want to proceed? " . _userInput.sh
if [[ $opt = YES ]]...
1,369
Posted By manishdivs
if you have gun grep, then you can try below ...
if you have gun grep, then you can try below

grep -A 2 <pattern to be searched> <file name>
6,108
Posted By manishdivs
Thank you very much for your help. This worked...
Thank you very much for your help.
This worked fine for spaces.

I have not been in situation to deal with TAB but it's a good idea to put a logic for TAB as well.

I tried following option to...
6,108
Posted By manishdivs
sed "s/^restoredb2=.*/#&\\ ...
sed "s/^restoredb2=.*/#&\\
restoredb2=$restoredb2_value # $comment/" restore_$(basename $PWD).sh

I am using above command to look for a line starting with word "restoredb2=" and commenting it....
6,108
Posted By manishdivs
Yes. Got it!! Thanks. sed 's/^line=.*/#&\ ...
Yes. Got it!! Thanks.

sed 's/^line=.*/#&\
line=$restoreufs $comment/' manish

where
restoreufs="line=ffffff"
comment="This comment line"

When I am trying to read restoreufs & comment...
6,108
Posted By manishdivs
Hello, Once I insert a new line then I would...
Hello,

Once I insert a new line then I would like to put some comment in front of that line.

I am able to achieve this using following separate command:
sed 's/\(^line=.*\)/\1 #Code Change...
6,108
Posted By manishdivs
It is giving following error: sed: 0602-404...
It is giving following error:
sed: 0602-404 Function s/^line=.*/#&\
line=ffffff cannot be parsed.
6,108
Posted By manishdivs
bartus11, Many thanks for your reply. It...
bartus11,
Many thanks for your reply.

It commented the required line but inserted the line in the commented line not in next line.

sed 's/\(^line=.*\)/#\1\nline=ffffff/' manish
#line=aaaaaa...
6,108
Posted By manishdivs
Commenting a specific line and inserting a new line after commented line.
Hello All,

I have following file contents
cat file
#line=aaaaaa
#line=bbbbbb
#line=cccccc
#line=dddddd
line=eeeeee
#comment=11111
#comment=22222
#comment=33333
#comment=44444...
2,673
Posted By manishdivs
For reading 1st word: temp11=$(awk '{print...
For reading 1st word:

temp11=$(awk '{print $1}' file_name.txt)
echo $temp11

OR

temp2=$(cut -d " " -f1 file_name.txt)
echo $temp2

For reading 1st character:

temp=$(cut -c 1...
2,762
Posted By manishdivs
Hello, Directory is having following files: ...
Hello,

Directory is having following files:
A_Normal
B_Normal
C_Normal
Etc tc

I would like to rename all the files without “_Normal”. After rename the file name should be:
A
B
C
Etc etc...
2,824
Posted By manishdivs
12:41:00 $ uname -a AIX AIX-sizing 1 6...
12:41:00 $ uname -a
AIX AIX-sizing 1 6 00F6FFEF4C00
12:41:01 $
2,824
Posted By manishdivs
Yes. I am trying to send e-mail to to an external...
Yes. I am trying to send e-mail to to an external domain (my office id.)

ls: 0653-341 The file /etc/resolv.conf does not exist.
2,824
Posted By manishdivs
MAILER-DAEMON for unknown host error is received...
MAILER-DAEMON for unknown host error is received in my unix mail box.

Auto-Submitted: auto-generated (failure)
(reason: 550 Host unknown)

But I am sending e-mail to my existing e-mail account....
2,824
Posted By manishdivs
Sending e-mail from unix
Hello,

I want to send an email from unix. I tried following commands:

mailx -s "hello" manish.xxx@xxx.com < echo_manish
and
echo "Testing Mail" | mailx -s "hello" manish.xxx@xxx.com

but in...
Showing results 1 to 25 of 62

 
All times are GMT -4. The time now is 03:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy