Sponsored Content
Top Forums UNIX for Dummies Questions & Answers How to take every number in in file by sed? Post 302941693 by weslyarfan on Monday 20th of April 2015 03:44:43 AM
Old 04-20-2015
Can I do it by SED command?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

SED: Update Last Line with Number Lines in File

Hi, I have to update last line of a text file with the number of lines in that file. This last line will have text such as 0.0000 and I should replace this with number lines. If lines are 20 then it should be replaced with 00020. Any sed or awk cmd help would be appreciated (3 Replies)
Discussion started by: bmkux
3 Replies

2. UNIX for Dummies Questions & Answers

how to number format a data file without using SED?

Hi I have a file which contains data (list of data) and I want to put a number with bracket 1) 2) 3) etc at the beginning of every successive line I can do it with SED and I can also do it using the nl route but am looking for a different method. I'm guessing I would need some sort of loop... (3 Replies)
Discussion started by: Cactus Jack
3 Replies

3. Shell Programming and Scripting

how to change a number in a file with sed?

Hello, I have a file which contains some line as follows, 9.9 TEMP 9.9 MUCOEFF 0.0 EPSILON And I want to increase this MUCOEFF by 0.2 as 9.9 TEMP 10.1 MUCOEFF 0.0 ... (7 Replies)
Discussion started by: lorenzz
7 Replies

4. Shell Programming and Scripting

Extract a number from a line in a file and sed in another copied file

Dear all, I am trying to extract a number from a line in one file (task 1), duplicate another file (task 2) and replace all instances of the strings 300, in duplicated with the extracted number (task 3). Here is what I have tried so far: for ((k=1;k<4;k++)); do temp=`sed -n "${k}p"... (2 Replies)
Discussion started by: mnaqvi
2 Replies

5. Shell Programming and Scripting

Help on Sed/awk/getting line number from file

I Have file1 with below lines : #HostNameSelection=0 :NotUsed #HostNameSelection=1 :Automatic #HostNameSelection=3 :NotForced I have file2 which has similar lines but with different values I want to copy the changes from file1 to file2 ,line by line only if line begins with '#'. for... (7 Replies)
Discussion started by: mvr
7 Replies

6. UNIX for Dummies Questions & Answers

Deleting "user input line number" from a file using sed

Hi I want to delete a line from a txt file for which the line number is user input. Say when user selects 19, the 19th line would be deleted from the file. Can anyone please provide me with a sed one liner for the same... I tried sed -i. The interaction would be like this Enter the line to... (1 Reply)
Discussion started by: sudeep.id
1 Replies

7. Shell Programming and Scripting

Replace a pattern in a file with a generated number using sed or awk

my file has thousands of line but let me show what i want to achieve... here is one line from that file cat fileName.txt (2,'','user3002,user3003','USER_DATA_SINGLE',1,0,0,'BACKUP',2,NULL,0,450,NULL,NULL,'','2011-05-10... (13 Replies)
Discussion started by: vivek d r
13 Replies

8. Shell Programming and Scripting

Deleting "user input line number" from a file using sed

Hi I want to delete a line from a txt file for which the line number is user input. Say when user selects 19, the 19th line would be deleted from the file. Can anyone please provide me with a sed one liner for the same... I tried sed -i. The interaction would be like this Enter the line... (4 Replies)
Discussion started by: sudeep.id
4 Replies

9. Shell Programming and Scripting

sed command to replace a line in a file using line number from the output of a pipe.

Sed command to replace a line in a file using line number from the output of a pipe. Is it possible to replace a whole line piped from someother command into a file at paritcular line... here is some basic execution flow.. the line number is 412 lineNo=412 Now i have a line... (1 Reply)
Discussion started by: vivek d r
1 Replies

10. UNIX for Beginners Questions & Answers

File manipulation place 0 before the number using sed

I'm new with sed, and i am really confused with slashes, backslashes, parentheses, I've tried reading some beginner's guide, but still trouble fixing this problem, do you have any tips where or what to read to learn more about sed? can you also help me with my problem? Note: I was tasked to use... (4 Replies)
Discussion started by: akopocpoypoy
4 Replies
MKOCTFILE(1)						      General Commands Manual						      MKOCTFILE(1)

NAME
mkoctfile - Compile dynamic-load modules for GNU Octave SYNOPSIS
mkoctfile [OPTION]... file... DESCRIPTION
mkoctfile is used to compile C, C++, or Fortran source code in to a dynamically loadable .oct file for octave(1). OPTIONS
-h, -?, --help Print help message. -Idir Add include directory dir to compile commands. -idirafterdir Add include directory to second include search path after '-I'. -Ddef Add definition def to compiler command. -llib Add library lib to link command. -Ldir Add library directory dir to link command. -Rdir Pass -Rdir to link command. -g Enable debugging option for all compilers. -pthread Add -pthread to link command. -W... Pass flags to the compiler such as -Wa,OPTION. -Wl,... Pass flags to the linker such as -Wl,-rpath=... -M, --depend Generate dependency files (.d) for C and C++ source files. -c Compile but do not link. --link-stand-alone Link a stand-alone executable file. -s, --strip Strip the output file. --mex Create a MEX file. Set the default output extension to .mex. -o file, --output file Output file name. Default extension is .oct (or .mex if --mex is specified) unless linking a stand-alone executable. -p VAR, --print VAR Print configuration variable VAR. Recognized variables are: ALL_CFLAGS FFTW3F_LIBS ALL_CXXFLAGS FLIBS ALL_FFLAGS FPICFLAG ALL_LDFLAGS INCFLAGS BLAS_LIBS LAPACK_LIBS CC LDFLAGS CFLAGS LD_CXX CPICFLAG LD_STATIC_FLAG CPPFLAGS LFLAGS CXX LIBCRUFT CXXFLAGS LIBOCTAVE CXXPICFLAG LIBOCTINTERP DEPEND_EXTRA_SED_PATTERN LIBS DEPEND_FLAGS OCTAVE_LIBS DL_LD OCTAVE_LINK_DEPS DL_LDFLAGS OCT_LINK_DEPS EXEEXT RDYNAMIC_FLAG F77 READLINE_LIBS F77_INTEGER_8_FLAG SED FFLAGS XTRA_CFLAGS FFTW3_LDFLAGS XTRA_CXXFLAGS FFTW3_LIBS FFTW3F_LDFLAGS -v, --verbose Echo commands as they are executed. file Compile or link file. Recognized file types are .c C source .cc C++ source .C C++ source .cpp C++ source .f Fortran source (fixed form) .F Fortran source (fixed form) .f90 Fortran source (free form) .F90 Fortran source (free form) .o object file .a library file SEE ALSO
octave (1). AUTHOR
John W. Eaton <jwe@octave.org> This manual page was contributed by Dirk Eddelbuettel <edd@debian.org> for the Debian GNU/Linux distribution but may be used by others. GNU Octave 4 February 2011 MKOCTFILE(1)
All times are GMT -4. The time now is 04:39 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy