Hi,
Does anyone know if its possible to add something like an end of line like c or java in unix?
dirs=/home/nosnam
var=''
for dir in $dirs
do
listDirs=`ls -d1 $dir/*`
for eachList in $listDirs
do
listRepos=`du -ks $eachList | awk '{ x+=$1 }; END { print x... (4 Replies)
Hi i would like to add line numbers to end of each line in a file.
I am able to do it in the front of each line using sed, but not able to add at the end of the file.
Can anyone suggest
The following code adds line number to start of each line
sed = filename | sed 'N;s/\n/\t/'
how can i... (5 Replies)
Hi,
I want to add \n as a EOF at the end of file if it does't exist in a single command. How to do this?
when I use command
echo "1\n" > a.txt
and
od -c a.txt
0000000 1 \n \n
0000003
How does it differentiate \n and eof in this case?
Regards,
Venkat (1 Reply)
hi,
i have file which is having large sql query
eg :
i am executing this sql file but now i want to add ; after query on same line
i.e. i should look like
any idea how to achieve it ? (6 Replies)
Problem: I have a lot of files, the files first line should always have 4 spaces before any text. Occasionally some of the files will miss the leading spaces and it's a problem. This is only in the first line.
So if there are 4 spaces then text, do nothing. If there are not 4 spaces, add 4... (2 Replies)
I have a file with varying record length in it. I need to reformat this file so that each line will have a length of 100 characters (99 characters + the line feed).
AU * A01 EXPENSE 6990370000 CWF SUBC TRAVEL & MISC
MY * A02 RESALE 6990788000 Y... (3 Replies)
I'm trying to add a '1' before a line that has the word "C_ID"
s/.*C_ID.*/&\n1/
The above code did what I need, but the '1' is added after the C_ID word :( Help please. (5 Replies)
Hello experts,
I need to convert one file into readable format.
Input file is like following line.
STG,12345,000,999,' PQR, 2345,000,999,' XYZ,7890,000,999,
Output should be following (After ' char new line char should be added.)
STG,12345,000,999,'
PQR, 2345,000,999,' ... (16 Replies)
How to add a comma at the end of each line in this file?30 1412
30 3352
30 5254
30 5543
30 7478
3 28
3 30
3 39
3 54
3 108
3 152
3 178
3 182
3 214
3 271
3 286
3 300
3 348
3 349
3 371 (3 Replies)
Need to add a numeric & special char to end of the first line
Existing file:
12-11-16|11 2016 Jan 12:34:55|03:55|
13-10-16|10 2016 Jan 12:34:55|03:55|12-11-16|11 2016 Jan 12:34:55|03:55|
14-10-16|19 2016 Jan 12:34:55|03:55|13-11-16|11 2016 Jan 12:34:55|04:55|
15-10-16|18 2016 Jan... (11 Replies)
Discussion started by: Joselouis
11 Replies
LEARN ABOUT DEBIAN
fvwmsavedesk
FvwmSaveDesk(1) Fvwm Modules FvwmSaveDesk(1)NAME
FvwmSaveDesk - another fvwm desktop-layout saving module
SYNOPSIS
FvwmSaveDesk is spawned by fvwm, so no command line invocation will work.
DESCRIPTION
When called, this module will attempt to save your current desktop layout as a definition of extra lines for the function InitFunction into
the file .fvwm2desk in your home directory. As explain in the other documentation, this function is called at startup of fvwm. You have to
include this file in .fvwm2rc after the definition of the Function Initfunction. You can do this by using the module FvwmM4 or FvwmCpp.
Your applications must supply certain hints to the X window system. Emacs and Netscape, for example, does not, so FvwmSaveDesk can't get
any information from it.
Also, FvwmSaveDesk assumes that certain command line options are globally accepted by applications, which may not be the case.
SETUP USING FVWMM4 MODULE
The M4 Macro processor substitutes its macros even in the middle of a word. Because of that you may have problems with predefined macros
such as include or define. To avoid this the GNU M4 has an extra option to prefix all builtins with 'm4_'. FvwmM4 can be called with option
-m4-prefix and then will provide the option -P to M4. I personally use the FvwmM4 module this way.
fvwm -cmd "FvwmM4 -m4-prefix -m4opt -I$HOME $HOME/.fvwm2rc"
Simply add the following line to the end of .fvwm2rc:
m4_include(`.fvwm2desk') .
SETUP USING FVWMCPP MODULE
With the FvwmCpp you may have the problem that the preprocessor directives starts with the comment character '#' and will complain about
unknown directives, if you have comments in your .fvwm2rc.
fvwm -cmd "FvwmCpp -C-I$HOME $HOME/.fvwm2rc"
Simply add the following line to the end of .fvwm2rc:
#include ".fvwm2desk"
INVOCATION
FvwmSaveDesk can be invoked by adding it to a menu or binding it to a mouse button or key stroke in the .fvwm2rc file. Fvwm will search
directory specified in the ModulePath configuration option to locate FvwmSaveDesk.
To insert it to a menu, add the line
+ "Save Desktop" Module FvwmSaveDesk
to the menu definition. I thing binding it to a mouse button is not very useful, but you can do that, by adding for example this line.
Mouse 3 R CS Module FvwmSaveDesk
Than FvwmSaveDesk will be called if you hit the right mouse button on the root window while holding the shift and control button down.
You can bind FvwmSaveDesk to a function key F10 for example you have to insert the following line:
Key F10 A Module FvwmSaveDesk
I personally add it as a Button to the module FvwmButtons:
*FvwmButtons SaveDesc desk.xpm Module FvwmSaveDesk
AUTHOR
Carsten Paeth (calle@calle.in-berlin.de)
3rd Berkeley Distribution 09 May 2010 (2.5.30) FvwmSaveDesk(1)