i am writing a script in which i take an input from user and find it in a file and replace it.
My input file looks like
my code looks is
Variables are not expanded inside single quotes; use double quotes:
Quote:
When i run my script, it ask me for name suppose i gave "john"... but the output comes as shown below
so, can anyone explain how i can get proper output which should be.
Hi
In our html pages, we have the image path as "/dir1/dir2/image.gif".
We are changing the location of the image directory.
So now we wish to do a global search and replace the path. I think we are having trouble with forward slash character.
Please help
Thanks in advance
Vikas
a... (3 Replies)
I have statement like this
column_id.columnname=="value"
in unix i want to modify above statement to
variable1=="value"
that means i have to replace the string before "==" by string "variable1"
second catch is, in statement instead of "==" you can have any arithmatic comarision... (7 Replies)
After running a command like
grep -ir files2/ *
This will find all the files that contain "files2/" in it.
For example if it finds
files2/dir/today
files2/dir/yesterday
files2/dir/2daysago
Now it may find 100 instances, so is there a quick find and replace command I can use? I... (4 Replies)
Hi,
I am trying to do this find and replace in unix and somehow its not working.
TR|20080325|22952 |000000040|20080327|0530
TR|20080417|23078 |000000104|20080418|0530|1040001 |
I have the records coming in the above format. My requirement is if delimiter count is not 8 then... (2 Replies)
i have a script that will find a certian pattern and replace it with blank space
#!/bin/ksh
for i in `cat test.txt | grep "UTILINET" | cut -c 172-191`
do
perl -pi -e 's/$i//g' test.txt
echo "Completed"
done
the command gives some of the below strings
50032E1B ... (5 Replies)
Need to convert
echo "7 6"
to
$7,$6
But the count of numbers can increase say echo "7,6,8,9" tried this didn't work
echo "7 6" | sed 's/\(*\)/\1/'
But did not help much (3 Replies)
In a directory I have many XML files, how to search for the string
<text>You are here</text> and replace it with
<text>YOU Are HERE</bc-text> in a unix command
find . -name "*.xml" (1 Reply)
Hi Team,
one silly issue. but its not working for me.
I need to find a pattern a file and replace it with the given value in another file.
Here's the code snippet.
Search_String=100
Replace_String=151
cat ${work}/temp_${CSV_File} | sed 's|"${Search_String}"|"${Replace_String}"|g'... (2 Replies)
Hi,
I have a variable which holds the below value:
echo $FROM_DIR
/fsg/fgldevu/fs_ne/inst/FGLDEVU_01/logs/appl/conc/out/o14946708.out
I want to change the value in the variable as below:
out/o to be replaced with log/l
.out to be replaced with .req
The desired output should look like... (5 Replies)
Discussion started by: Prasannag87
5 Replies
LEARN ABOUT OSF1
line
line(1) General Commands Manual line(1)NAME
line - Reads one line from standard input
SYNOPSIS
line
STANDARDS
Interfaces documented on this reference page conform to industry standards as follows:
line: XCU5.0
Refer to the standards(5) reference page for more information about industry standards and associated tags.
OPTIONS
None
DESCRIPTION
The line command copies one line, up to and including a newline, from standard input and writes it to standard output. Use this command
within a shell command file to read from your terminal. The line command always writes at least a newline character.
NOTES
The line utility has no internationalization features and is marked LEGACY in XCU Issue 5. Use the read utility instead.
EXIT STATUS
Success. End-of-File.
EXAMPLES
To read a line from the keyboard and append it to a file, enter: echo 'Enter comments for the log:' echo ': c' line >>log
This shell procedure displays the message: Enter comments for the log:
It then reads a line of text from the keyboard and adds it to the end of the file log. The echo ': c' command displays a : (colon)
prompt. See the echo command for information about the c escape sequence.
SEE ALSO
Commands: echo(1), ksh(1), read(1), Bourne shell sh(1b), POSIX shell sh(1p)
Functions: read(2)
Standards: standards(5)line(1)