I've forgotten how to use a filename parameter
using sed inside a shell script. What I want to do is
replace a string inside a file with the name of
the file being processed.
I think this should work ..
for filename do
sed -e "s/xxx/$filename/" ...
...
done
Thanks!
Ps: ... (5 Replies)
I'm trying to make a bash shell script that will allow a user to modify another file based on input they give. Maybe someone can see what I'm doing wrong here. I'm still pretty new at this...
Let's say my temp file contains this:
0 1 HELLO 3 4
And here's the code:
old=(0 1 3 4)
new=(zero... (2 Replies)
Hi all,
I have a data file formatted as in the following line:
Achadd 0:35 1:35 2:35 3:40 4:40 5:40
I need the minutes converted to seconds; I wrote a script, min2sec, to do so for one datapoint. I was hoping to use sed as in the following code to call this script and... (4 Replies)
Hi
The following code seems to work, but why am i getting an error message?
cscyabl@comet:(develop)> awk 'BEGIN {FS="|"}{print $2 >> $1}' test.sum
awk: A print or getline function must have a file name.
The input line number is 8. The file is test.sum.
The source line number is 1.
... (2 Replies)
sed -n '57p' filename
My file contains 57 lines ,the above command prints the 57 th line,but i want to assign the result of this to a variable, to compare with another line in a different file
suggest me some idea
if i directly use this to assign with variable like h=sed -n '57p' filename... (2 Replies)
Hello All,
I'm trying to write a script that will perform a dynamic match (of a dynamic variable) and set a variable to have the resulting (match) value.
The idea is that the environment variable to check ($1) and the regular expression to use ($2) are given as parameters.
For example,... (5 Replies)
Hi Experts,
Please let me know how to below situation:
Looking for:
sed "${linenum}d" $filename > $filename _Without_7C
Working Command:
sed "${linenum}d" A020820122200.tis2webGMNA001_GDS_DIDOut.txt > A020820122200.tis2webGMNA001_GDS_DIDOut.txt_Without_7C
appriciate if you can... (7 Replies)
I came across this sed expression, and it does exactly what I want.
However I haven't got the faintest clue how it does it and thus do not feel capable of using it.
Can someone please explain how this expression works?
(I used it to remove html tags in a html file I was converting to text)
... (3 Replies)
Hello,
Is it possible to embed the command output to the replacement of sed? Say I need to replace all the blank lines with random strings:
input:
ACCTTCGTCTTCTGG
GCTTGAGATGGTCCA
GCAGGGCTAGTGACG
GACGAGTCTCTTGAC
ACCAAATCAAAGATCand output is:
>26aa36d934d44f06d15b3aab4645a602 $(date |... (9 Replies)
Hello,
I'm using the awk command to insert empty columns on a tab delimited flatfile - which works fine -
=> But I'm not able to manage dynamicaly the filename of the awk output based on the source flatfile filename
I have 3 source flatfile:
flatfile_Jan-2016.csv
flatfile_Feb-2016.csv... (3 Replies)
Discussion started by: Tipiak
3 Replies
LEARN ABOUT DEBIAN
buildapp
BUILDAPP(1) User Commands BUILDAPP(1)NAME
buildapp - application to create common lisp images
SYNOPSIS
buildapp --output OUTPUT-FILE [--flag1 value1 ...]
DESCRIPTION
Required flags:
--output OUTPUT-FILE
Use OUTPUT-FILE as the name of the executable to create
Entry-point flags:
--entry NAME
Use the function identified by NAME as the executable's toplevel function. Called with SB-EXT:*POSIX-ARGV* as its only argument. If
NAME has a colon, it is treated as a package separator, otherwise CL-USER is the implied package.
--dispatched-entry DNAME
Specify one possible entry function, depending on the name of the file that is used to start the application. The syntax of DNAME is
APPLICATION-NAME/ENTRY-NAME. If the name used to start the executable matches APPLICATION-NAME, use ENTRY-NAME as the entry point.
This can be used to choose one of many possible entry points by e.g. symlinking names to the application executable. If APPLICA-
TION-NAME is empty, the specified ENTRY-NAME is used as a default if no other application names match. There may be any number of
dispatched entry points, but only one default.
Action flags:
--load FILE
Load FILE. CL:*PACKAGE* is bound to the CL-USER package before loading
--load-system NAME
Load an ASDF system identified by NAME
--require NAME
Use CL:REQUIRE to load NAME
--eval CODE
Use CL:EVAL to evaulate CODE. The code is read with CL:READ-FROM-STRING in the CL-USER package
There may be any number of load/load-system/require/eval flags. Each is executed in command-line order before creating an executable.
Load path flags:
--load-path DIRECTORY
When handling a --load, search DIRECTORY for files to load
--asdf-path DIRECTORY
When handling a --load-system, search DIRECTORY for ASDF system files to load
--asdf-tree DIRECTORY
When handling a --load-system, search DIRECTORY and all its subdirectories for ASDF system files to load
There may be any number of load-path/asdf-path/asdf-tree flags. asdf-path arguments take precedence over asdf-tree arguments.
Other flags:
--help Show this usage message
--logfile FILE
Log compilation and load output to FILE
--sbcl PATH-TO-SBCL
Use PATH-TO-SBCL instead of the sbcl program found in your PATH environment variable
For the latest documentation, see http://www.xach.com/lisp/buildapp/
buildapp 1.1 July 2010 BUILDAPP(1)