Difference between revisions of "Line"
Jump to navigation
Jump to search
↑ https://stackoverflow.com/a/9605450
Line 1: | Line 1: | ||
− | |||
[[wikipedia:line]] | [[wikipedia:line]] | ||
Line 16: | Line 15: | ||
Add line: | Add line: | ||
* {{add line}} | * {{add line}} | ||
+ | |||
+ | [[Remove first line]]: | ||
+ | * <code>[[tail -n +2]]</code> | ||
== Activities == | == Activities == |
Revision as of 10:06, 7 February 2024
Count lines:
Merge every two lines:
cat /path/tofile.txt | paste -d " " - -
[1]cat /path/tofile.txt | xargs -n2 -d'\n'
Add line:
grep -qxF 'your text "additional text"' yourfile.txt || echo 'your text "additional text"' >> yourfile.txt
Activities
Related
See also
line
,newline
,characters
,wc, column
, Add line, Concatenate lines, Ansible: lineinfile, rpl, sed -i- file, File system, directory,
touch
,mkdir
,ls
,ln
truncate
,fallocate
,split
,stat
, inode, File descriptor, superblock, block size (blockdev
),fuser
,lsof
,scrub
,chattr
, ulimit (nofiles),cp
,mv
,file (command)
,mkfifo
,chmod
Advertising: