Difference between revisions of "Line"
Jump to navigation
Jump to search
↑ https://stackoverflow.com/a/9605450
(17 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
[[wikipedia:line]] | [[wikipedia:line]] | ||
Line 5: | Line 4: | ||
* <code>[[wc -l]]</code> | * <code>[[wc -l]]</code> | ||
− | [[Concatenate]] | + | [[Concatenate lines]]: |
− | + | {{concatenate lines}} | |
− | |||
+ | [[New line]]: | ||
+ | * <code>[[echo]]</code> | ||
+ | Merge every two lines: | ||
+ | * {{merge every two lines}} | ||
+ | |||
+ | Add line: | ||
+ | * {{add line}} | ||
+ | |||
+ | [[Remove first line]]: | ||
+ | * <code>[[tail -n +2]]</code> | ||
+ | |||
+ | == Activities == | ||
+ | * [[Concatenate lines]] | ||
== Related == | == Related == | ||
− | * <code>[[split (command)]]</code> | + | * <code>[[split (command)|spit]]</code> |
− | * | + | * <code>[[column]]</code> |
− | |||
− | |||
* <code>[[uniq]]</code> | * <code>[[uniq]]</code> | ||
* <code>[[echo -n]]</code> | * <code>[[echo -n]]</code> | ||
− | * [[ | + | * <code>[[grep .]]</code> |
+ | * [[Cisco IOS]]: <code>[[line vty]]</code> | ||
+ | * [[End of line]] | ||
+ | * [[Line, Instant Messaging]] | ||
== See also == | == See also == |
Latest revision as of 08:40, 29 June 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[edit]
Related[edit]
See also[edit]
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: