I'm trying to insert a single character at position 11 in everyline of a file.
My input file looks like this:
456781 ~Y~12345
456782 ~N~12300
and I want my output to look like this:
45678~1 ~Y~12345
45678~2 ~N~12300
I tried the following awk code, but it's not working:... (3 Replies)
Hi,
I have a log file generated by a tool which has the following look :
/tmp/releases/directory/datefilename1_release_date.zip
/tmp/releases/directory/datefilename2_release_date.zip
/tmp/releases/directory/datefilename3_release_date.zip... (8 Replies)
Hi All,
I have below type file.
abc|asd|pqr|2|2|2
asc|qwe|scf|5|4|4
Pipe location and count is dynamic and coming from a variable.
I want to change it to below files.
(chnage the first pipe to 3 pipes)
abc|||asd|pqr|2|2|2
asc|||qwe|scf|5|4|4
(chnage the second pipe to 4 pipes)... (1 Reply)
Hi,
I need to add Pipe (|) at 5th and 18th position of all records a file. How can I do this?
I tried to add it at 5th position using the below code. It didnt work. Please help!!!
awk '{substr($0,5,1) ~ /|/}{print}' $input_file > $temp_file (1 Reply)
I have a file and I can get the line with a specific pattern. I want to inset # on start of the line.
file.text
====
aa bb cc
bb hh kk
kk ll yy
dd aa kk
rr tt aa
I want to comment out the line with contain "aa"
after running the script
file.text
====
#aa bb cc
bb hh kk
kk ll... (7 Replies)
Hi,
Anyone can help me in Solaris command on how to insert a file at specific line.
I want file1.sql content to be inserted on file2.sh after "recover database using backup controlfile until cancel".
# file1.sql
/archivelogs/927_822338133.arc
/archivelogs/671_822338107.arc... (3 Replies)
Hi,
If my first character of a line starts with 2 then after 5th charecter newline character should be inserted.
Input.txt:
a1234567890
2222300007
bsdfsdf888999999
ssdfkjskfdjskfdjd
2899900000000099999999999999
28887777
999999999999999999
Output.txt:
a1234567890
22223
00007... (8 Replies)
Hi All,
I am trying to write a shell script where it should insert character 'I' in 180th position of each line(except first and last line) of the file. Below is the script
for file in /home/test/bharat/*.RET
do
# Process file
echo "File Name=" $file
#l_fileName="${file##*/}"
... (19 Replies)
I will appreciate if you help me here in this script in Solaris Enviroment.
Scenario:
i have 2 files :
1) /tmp/TRANSACTIONS_DAILY_20180730.txt:
201807300000000004
201807300000000005
201807300000000006
201807300000000007
201807300000000008
2)... (10 Replies)
Discussion started by: teokon90
10 Replies
LEARN ABOUT FREEBSD
vgreduce
VGREDUCE(8) System Manager's Manual VGREDUCE(8)NAME
vgreduce - reduce a volume group
SYNOPSIS
vgreduce [-a|--all] [-A|--autobackup y|n] [-d|--debug] [-h|-?|--help] [--removemissing] [-t|--test] [-v|--verbose] VolumeGroupName [Physi-
calVolumePath...]
DESCRIPTION
vgreduce allows you to remove one or more unused physical volumes from a volume group.
OPTIONS
See lvm for common options.
-a, --all
Removes all empty physical volumes if none are given on command line.
--removemissing
Removes all missing physical volumes from the volume group, if there are no logical volumes allocated on those. This resumes normal
operation of the volume group (new logical volumes may again be created, changed and so on).
If this is not possible (there are logical volumes referencing the missing physical volumes) and you cannot or do not want to remove
them manually, you can run this option with --force to have vgreduce remove any partial LVs.
Any logical volumes and dependent snapshots that were partly on the missing disks get removed completely. This includes those parts
that lie on disks that are still present.
If your logical volumes spanned several disks including the ones that are lost, you might want to try to salvage data first by acti-
vating your logical volumes with --partial as described in lvm (8).
SEE ALSO lvm(8), vgextend(8)Sistina Software UK LVM TOOLS 2.02.95(2) (2012-03-06) VGREDUCE(8)