09-26-2009
I am really not sure what you are asking. Could you provide a bit more detail, such as a few lines from the current file (or mock ups), and what you want them to look like ?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: nosnam
4 Replies
2. UNIX for Advanced & Expert Users
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)
Discussion started by: rudoraj
5 Replies
3. Shell Programming and Scripting
Hi Folks,
Using the Vi, how can I add a numbers at the end of the line.
For eg: I have the numbers in the file as:
58.125.33
22.58.68
25.144.225
114.25.38
I need to add .0/8 at the end of all the line. So, it should be like
58.125.33.0/8
22.58.68.0/8
25.144.225.0/8
114.25.38.0/8 (6 Replies)
Discussion started by: gsiva
6 Replies
4. Shell Programming and Scripting
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)
Discussion started by: udelalv
3 Replies
5. Shell Programming and Scripting
Hello
How can I add a string (always the same) at the end of a specific line in a file...
The file is:
000000001 041 L $$aspa
000000001 088 L $$aJ.E.N. 551
000000001 090 L $$aINFORMES JEN
000000001 100 L $$aautor 1
----
000000002 041 L $$aeng
000000002 088 L $$aJ.E.N. 1... (13 Replies)
Discussion started by: ldiaz2106
13 Replies
6. Shell Programming and Scripting
hi,
In my input file i have less number of pipe symbol , it is suppose to be 10 pipe symbol. If the inputfile have less than 10 pipesymbol then i need append upto 10 pipe symbol.
please help to solve problem.
Input file :
abc|xyz|
1|2|3|4|5|
s|
1|2|||||||||
Output file :
... (4 Replies)
Discussion started by: Jairaj
4 Replies
7. Shell Programming and Scripting
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)
Discussion started by: gunjan
3 Replies
8. Shell Programming and Scripting
Hai,
I have got a small requirement in my script. and i am using bash shell. I need to add a dot (.) for some particular line in a file. Say for example,
$Cat rmfile
1 This is line1
2 This is line2
3 This is line3
O/p should be :
$Cat rmfile
1 This is line1
2 This is line2. #... (2 Replies)
Discussion started by: Sivajee
2 Replies
9. Shell Programming and Scripting
i want to add a white-space at the end of each line for my inp.file, but when i do it, the result is a new line with a white-space between each line!
my input:
2012 0811 1223 15.2 L 38.393 46.806 9.0 Teh 78 0.5 6.5LTeh 1
GAP=74 ... (5 Replies)
Discussion started by: saeed.soltani
5 Replies
10. Shell Programming and Scripting
Seems simple but ive been searching for a good hour of so
I have a text file and would like to add a string to the end of line 5 ( as an example)
to ake tings hard the line number we have to add the text to is stored in a variable cunningly name $Line_to_append
any ideas on how this could... (2 Replies)
Discussion started by: dunryc
2 Replies
LEARN ABOUT ULTRIX
systemd-nspawn
SYSTEMD-NSPAWN(1) systemd-nspawn SYSTEMD-NSPAWN(1)
NAME
systemd-nspawn - Spawn a namespace container for debugging, testing and building
SYNOPSIS
systemd-nspawn [OPTIONS...] [COMMAND] [ARGS...]
DESCRIPTION
systemd-nspawn may be used to run a command or OS in a light-weight namespace container. In many ways it is similar to chroot(1), but more
powerful since it fully virtualizes the file system hierarchy, as well as the process tree, the various IPC subsystems and the host and
domain name.
systemd-nspawn limits access to various kernel interfaces in the container to read-only, such as /sys, /proc/sys or /sys/fs/selinux.
Network interfaces and the system clock may not be changed from within the container. Device nodes may not be created. The host system
cannot be rebooted and kernel modules may not be loaded from within the container.
Note that even though these security precautions are taken systemd-nspawn is not suitable for secure container setups. Many of the security
features may be circumvented and are hence primarily useful to avoid accidental changes to the host system from the container. The intended
use of this program is debugging and testing as well as building of packages, distributions and software involved with boot and systems
management.
In contrast to chroot(1) systemd-nspawn may be used to boot full Linux-based operating systems in a container.
Use a tool like debootstrap(8) or mock(1) to set up an OS directory tree suitable as file system hierarchy for systemd-nspawn containers.
Note that systemd-nspawn will mount file systems private to the container to /dev, /run and similar. These will not be visible outside of
the container, and their contents will be lost when the container exits.
Note that running two systemd-nspawn containers from the same directory tree will not make processes in them see each other. The PID
namespace separation of the two containers is complete and the containers will share very few runtime objects except for the underlying
file system.
OPTIONS
If no arguments are passed the container is set up and a shell started in it, otherwise the passed command and arguments are executed in
it. The following options are understood:
--help, -h
Prints a short help text and exits.
--directory=, -D
Directory to use as file system root for the namespace container. If omitted the current directory will be used.
--user=, -u
Run the command under specified user, create home directory and cd into it. As rest of systemd-nspawn, this is not the security feature
and limits against accidental changes only.
--private-network
Turn off networking in the container. This makes all network interfaces unavailable in the container, with the exception of the
loopback device.
EXAMPLE 1
# debootstrap --arch=amd64 unstable debian-tree/
# systemd-nspawn -D debian-tree/
This installs a minimal Debian unstable distribution into the directory debian-tree/ and then spawns a shell in a namespace container in
it.
EXAMPLE 2
# mock --init
# systemd-nspawn -D /var/lib/mock/fedora-rawhide-x86_64/root/ /sbin/init systemd.log_level=debug
This installs a minimal Fedora distribution into a subdirectory of /var/lib/mock/ and then boots an OS in a namespace container in it, with
systemd as init system, configured for debug logging.
EXIT STATUS
The exit code of the program executed in the container is returned.
SEE ALSO
systemd(1), chroot(1), debootstrap(8), mock(1)
AUTHOR
Lennart Poettering <lennart@poettering.net>
Developer
systemd 10/07/2013 SYSTEMD-NSPAWN(1)