Linux colrm command - Remove columns from a file

Linux colrm command: Remove columns from a file

Linux colrm command Function Description

Use the colrm command to remove selected columns from the file to send to the standard output.

Linux colrm command Syntax

colrm [Start column [End column]]

Linux colrm command Example

Delete column 3 and the characters after it from the /root/apidemos.com.txt file, and output

colrm 3 < /root/apidemos.com.txt

Output:

Linux colrm command

Delete the third column of the character abcde and the characters after it, and then output

 [root@rhel~]#colrm 3
 abcde                                  // Enter the character abcde
 ab
 // Finally press the [Ctrl+d] key combination to exit

Delete the characters between columns 3 and 5 in the character abcdefghi, and then output

[root@rhel ~]# colrm 3 5
abcdefghi                               // Enter the characters abcdefghi
abfghi
// Finally press the [Ctrl+d] key combination to exit
Like(1)

Related

Linux Login Logout Command
Linux login commandLinux logout commandLinux nologin commandLinux exit commandLinux sulogin commandLinux rlogin commandLinux poweroff commandLinux ctrlaltdel CommandLinux shutdown commandLinux halt commandLinux reboot commandLinux init commandLinux runlevel commandLinux telinit command
Linux File Management Command
Linux cat commandLinux tac commandLinux nl commandLinux more commandLinux less commandLinux head commandLinux tail commandLinux rev commandLinux fold commandLinux fmt commandLinux expand commandLinux pr commandLinux sort commandLinux uniq commandLinux cut commandLinux comm commandLinux diff commandLinux join commandLinux diff3 commandLinux cmp commandLinux colrm commandLinux paste commandLinux mkdir commandLinux tr commandLinux split commandLinux csplit commandLinux tee commandLinux unexpand commandLinux patch commandLinux awk commandLinux sed commandLinux od commandLinux pwd commandLinux cd commandLinux ls commandLinux dir commandLinux dirs commandLinux touch commandLinux rmdir commandLinux cp commandLinux mv commandLinux rm commandLinux install commandLinux tmpwatch commandLinux file commandLinux du commandLinux wc commandLinux tree commandLinux cksum commandLinux md5sum commandLinux sum commandLinux dirname commandLinux mkfifo Command
Cron Expressions
Cron Expression to Run Every Day at 12 PMUnderstanding Vue Cron ExpressionsUnderstanding JS Cron ExpressionsA Comprehensive Guide to Cron Expressions for Scheduled TasksUnderstanding Linux Cron ExpressionsUnderstanding Quartz Cron ExpressionsCron ExpressionCron Time ExpressionCron Expression ParsingCron Expression: Executing a Task Every SecondCron Expression for Every Minute ExecutionCron Expression to Execute Every 10 MinutesCron Expression: Executing Every HourCron Expression to Execute Once a YearCron Expression: How to Schedule a Task to Run Daily at Midnight?