I have a current code working(named subst1) having a user be able to type this line to substitute words using the sed command:
Here is my shell script:
The problem with this script is that it changes the date and creates a bak file. I need to alter this script so that when a user inputs the command line, the script checks if the given old-pattern is in the file and if it is, go ahead and do the substitution. If the old-pattern is not found, the script should do nothing. Any help would be appreciated!
Guys,
I've a problem in the "sed" command used in my shellscripts
This is the problamatic line in my shell script:
sed -e 's/${line1}/${line1_m}/g' prod_hier_1234.txt > test.txt
It doesn't do the job of replacing the string stored in variable 'line1' to 'line1_m'.
However If I replace the... (10 Replies)
Hello,
I have the following line in one of my shell scripts. It works fine when the search string($SERACH_STR) exists in the logfile($ALERTLOG) but if the search string does not exist this line errors out at run time. Is there a way to make this line return 0 if it is not able to find the... (4 Replies)
Hello,
i want to take the input from user and according to that variable's value search in file emp.lst. Here is what i came up with
echo -e "Enter string to be searched :\c"
read str
sed -n '/\$str/p' emp.lst
this is not working! any idea why?Thanks in advance! :) (4 Replies)
Hi All,
I am not much strong in shell scripting...
I am using sed command in my script to find and replace a string.......
This is how script looks :
#############
#!/usr/bin/ksh
CONFIG_FILE=iom_test.txt
FIND=`echo "NIS_FTP_SERVER1=123.456.iom.com"`
REPLACE=`echo... (2 Replies)
First off I have read the man pages for sed and am still having trouble working on a script to remove portions of a log:
My goal is to take a log file to be emailed, read the file and strip the portions away AFTER the line MIME-Version:1.0
and strip away until it to the line starting with... (4 Replies)
Hi All,
I am trying to use a sed command in a shell script in order to delete some lines in a file and I got the following error message.
I don't understand why it is not working 'cause I have tried with simple quotes, then with double-quotes, and it is not working.
sed: -e expression #1,... (7 Replies)
hi guys,
The following command doesn't seem to work in my shell script:
tag=$(sed -n '/${line}/ s/.*\.*/\1/p' myfile.txt)
When i replace the ${line} with an actual value, it works fine.
So, how do i use the ${line} in this sed command?
Thanks in advance,
Zaff (2 Replies)
I have a shell script (.sh) and I want to pass a parameter value to the awk command but I am getting exception, please assist.
diff=$1$2.diff
id=$2 new=new_$diff
echo "My id is $1"
echo "I want to sync for user account $id"
##awk command I am using is as below
cat $diff | awk... (2 Replies)
I am using a shell script in fedora linux. While calling to the shell I am also passing an argument (var1=0.77) like shown below
sh gossip.sh var1=0.77
in the shell following command is written (which doesn't work)
sed - i -e 's@prob=@prob="$var1";//@g' file.txt
Actually i want the... (7 Replies)
I have a simple task to replace unix line feed end of line characters with carriage returns.
When I run the following “change file in place” sed instruction from the command line all the Line feeds are successfully replaced with Carriage returns.
sed -i 's/$/\r/' lf_file.txt
But that same... (1 Reply)
Discussion started by: hawkman2k
1 Replies
LEARN ABOUT DEBIAN
xpat
XPAT(1) ALLIANCE Reference Manual XPAT(1)NAME
xpat - graphic pattern viewer
SYNOPSIS
xpat [-l file_name] [-xor] [-install] [-force]
ORIGIN
This software belongs to the ALLIANCE CAD SYSTEM developed by the ASIM team at LIP6 laboratory of Universite Pierre et Marie CURIE, in
Paris, France.
Web : http://asim.lip6.fr/recherche/alliance/
E-mail : alliance-users@asim.lip6.fr
DESCRIPTION
Xpat is a pattern viewer. All functionnalities can be accessed through different menus. Xpat works under Motif and X11r6. When entering
Xpat, the main window appears and shows 5 different menus on the top bar. These menus can be entered by simply clicking on the mouse left
button. Here is the description of these menus.
File Open : load an existing pattern file (see pat(5)).
Quit : quit xpat.
Edit Identify : identify a selected pattern.
Connected : highlight a selected pattern.
Search : search a pattern.
View Zoom : perform zoom in, zoom out, center, fit, refresh on figure.
Layer : select types of layers displayed.
Map : show cursor position in the entire figure.
Arrows : show arrows for moving at the grid step.
Grid : Set the X,Y step of the grid if displayed.
Tools Message : display the last error messages
Setup Save or load a user defined configuration of default displayed menus.
SPECIAL KEYS
+/- Increase or decrease the time scale.
OPTIONS -l file_name
Load the pattern file file_name (without extention .pat)
-xor Two graphic cursor methods can be used, invert or xor.
-force this option force all graphical objects to be displayed.
-install
Switch to a private color map.
ENVIRONMENT VARIABLES
MBK_WORK_LIB
indicates the path to the read directory for the session.
XPAT_PARAM_NAME (optionnal)
indicates the path to the parameter file used by Xpat.
SEE ALSO
mbk(1), MBK_WORK_LIB(1), PAT(5), asimut(1)BUG REPORT
This tool is under development at the ASIM department of the LIP6 laboratory.
We need your feedback to improve documentation and tools.
ASIM /LIP6 September 1, 2000 XPAT(1)