Sponsored Content
Top Forums Shell Programming and Scripting Ommit the numbers or any characters only at 8th columns after the dot (.). Post 302997115 by invinzin21 on Monday 8th of May 2017 08:54:10 AM
Old 05-08-2017
Ommit the numbers or any characters only at 8th columns after the dot (.).

Ommit the numbers or any characters only at 7th or 8th columns after the dot (.) . Since the group column has 1 and 2 spaces.
Thanks


Code:
-rw-r--r--. 1 user1   domain users           619 2017-04-13 16:16:50.284598383 +0000  aa
drwxr-xr-x. 2 root    root             6 2017-05-08 12:40:33.182976407  +0000 aaa
-rw-r--r--. 1 root    root         13883 2017-03-31 17:07:35.821185258  +0000 aa.sh
-rw-r--r--. 1 root    root             0 2017-05-08 12:40:36.310976557  +0000 ab

Output:
Code:
-rw-r--r--. 1 user1 domain users           619 2017-04-13 16:16:50  aa
drwxr-xr-x. 2 root    root             6 2017-05-08 12:40:33  aaa
-rw-r--r--. 1 root    root         13883 2017-03-31 17:07:35  aa.sh
-rw-r--r--. 1 root    root             0 2017-05-08 12:40:36  ab


Last edited by invinzin21; 05-08-2017 at 10:02 AM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to ommit space

Good afternoon, How to output like this. $cat file file1 file2 file3 $cat file file1 file2 file3 (1 Reply)
Discussion started by: kenshinhimura
1 Replies

2. Shell Programming and Scripting

how to ommit column

Good afternoon, just wanna ask how to ommit, for example column 2 $cat file 1 2 3 4 1 2 3 4 5 1 2 3 1 2 1 2 3 4 5 6 output: 1 3 4 1 3 4 5 1 3 1 1 3 4 5 6 (2 Replies)
Discussion started by: invinzin21
2 Replies

3. Shell Programming and Scripting

searching regular expressions with special characters like dot using grep

hi everybody I am a new user to this forum and its previous posts have been very useful. I'm searching in a file using grep for patterns like 12.13.444 55.44.443 i.e. of form <digit><digit>.<digit><digit>.<digit><digit><digit> Can anybody help me with this. Thanks in advance (4 Replies)
Discussion started by: jpriyank
4 Replies

4. Shell Programming and Scripting

Greping numbers with dot in it

Hi, I wanted to create a script what would take two numbers out of two files and add them together, but I got stuck with greping numbers what have a dot in it. So far I have grepped the two lines what include the numbers I need (from both files) to a third file and from that file I try to... (7 Replies)
Discussion started by: mario8eren
7 Replies

5. UNIX for Dummies Questions & Answers

Matching numbers of characters in two lines

Dear all, I'm stuck on a certain problem regarding counting the number of characters in one line and then adjusting the number of characters of another line to this number. This was my original input data: @HWI-ST471_57:1:1:1231:2079/2... (4 Replies)
Discussion started by: DerSeb
4 Replies

6. Shell Programming and Scripting

Truncate all characters and numbers in string - using perl

hi, I have an data from file where it has 20110904 234516 <<hdd-10#console|0c.57,passed,5,28,READ,0,20822392,8,5,4,0,40,0,-1,0,29909,25000,835,3.3,0,0,0,0,implied,0,0,2011/9/5-2:3:17,2011/9/5-2:3:47,X292_0F15,TAP ,NQ09,J40LTG\r\r\n I want to remove characters till #console| i.e want... (1 Reply)
Discussion started by: asak
1 Replies

7. UNIX for Dummies Questions & Answers

Replace 8th and 9th characters in file permanently

Good evening, I have a file and wish to replace the 8th and 9th characters on the first line only no matter what they are with 44 and the file permanantly changed. e.g. file example.txt before change: 123456789123456 hi how are you blah blah file example.txt after change: ... (4 Replies)
Discussion started by: GarciasMuffin
4 Replies

8. Shell Programming and Scripting

How to ignore characters and print only numbers using awk?

Input: ak=70&cat15481=lot=6991901">Kaschau (1820-1840) ak=7078&cat15482=lot=70121">Principauté (1940-1993) ak=709&cat=lot15484=70183944">Arubas (4543-5043)Output: 70 15481 6991901 7078 15482 70121 709 15484 70183944 (11 Replies)
Discussion started by: sdf
11 Replies

9. Shell Programming and Scripting

Adding (as in arithmetic) to numbers in columns in file, and writing new file with new numbers

Hi again. Sorry for all the questions — I've tried to do all this myself but I'm just not good enough yet, and the help I've received so far from bartus11 has been absolutely invaluable. Hopefully this will be the last bit of file manipulation I need to do. I have a file which is formatted as... (4 Replies)
Discussion started by: crunchgargoyle
4 Replies

10. Shell Programming and Scripting

How i can add via preg replace dot after numbers ?

So lets say i have file my_birthday.402.zip ho it can became my_birthday.4.0.2.zip Thank you :) (1 Reply)
Discussion started by: ZerO13
1 Replies
dsenableroot(8) 					    BSD System Manager's Manual 					   dsenableroot(8)

NAME
dsenableroot -- enables or disables the root account. SYNOPSIS
dsenableroot [-d] [-u username] [-p password] [-r rootPassword] DESCRIPTION
dsenableroot sets the password for the root account if enabling the root user account. Otherwise, if disable [-d] is chosen, the root account passwords are removed and the root user is disabled. A list of flags and their descriptions: -u username Username of a user that has administrative privileges on this computer. -p password Password to use in conjunction with the specified username. If this is not specified, you will be prompted for entry. -r rootPassword Password to be used for the root account. If this is not specified for enabling, you will be prompted for entry. EXAMPLES
-dsenableroot Your username will be used and you will be queried for both your password and the new root password to be set to enable the root account. -dsenableroot -d Your username will be used and you will be queried for only your password to disable the root account. -dsenableroot -u username -p userpassword -r rootpassword The supplied arguments will be used to enable the root account. -dsenableroot -d -u username -p userpassword The supplied arguments will be used to disable the root account. Mac OS August 08 2003 Mac OS
All times are GMT -4. The time now is 11:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy