I am new to all of this and don't know much but the code used is split -b 4GB Super Smash Bros Brawl [RSBE01]
and it says split: extra operand "Bros"
and multiple times I've changed the code by adding a -, changing the size, removing the word it says, and also adding/removing the file type (wbfs) but I keep getting it and don't know what to do. Does anyone know how to fix this? I've spent two days looking online for help. I'm just trying to play it on my Wii.
Update: I removed all the spaces in the file name and now it says Split: cannot open 'SuperSmashBrosBrawl' for reading. No such file exists or directory.
Update 2: Problem solved. Thank you guys for the help
I have this file 1.txt
:
-e a
b
-e c
d
-e e
f
I want to split it into the following two files.
2.txt
-e a
-e c
-e e
3.txt
b
d
f
where 2.txt
contains all the lines starting with -e
, and 3.txt
contains all the other lines. Extra newlines (such as the extra newline in the middle of the original) can be ignored or kept, and order doesn't matter.
I've tried using split
, but it doesn't look like that allows me to use a pattern for splitting (instead a fixed number of lines per split file).
if you use (super + right/left arrow) it will move the window to the right or left side of the screen and you can split the entire of your screen for two windows. is there any way to do split the screen for more than two windows? for example I want to split my screen for 4 windows. how can i do it? I'm using ubuntu 20.04
So far I was only reading, but now I have to start with a complicated question. I was googling crazy but I can't find an answer and it must be in BASH. (Thank you for the ideas like Perl, not an option unfortunately.)
I have a text file where the data is separated with | character like this:
DETAIL||||||||||103|line1
DETAIL||||||||||103|line2
DETAIL||||||||||105|line3
DETAIL||||||||||433|line4
DETAIL||||||||||433|line5
I managed to split it to new files by the 11th key field using this:
cat extract_GL2_*.txt | grep DETAIL | awk -F\| '{print>>"SPLIT/"$11".txt"}'
There are two problems with this:
1. I would need to have the names assigned from an another file called Company.txt (placed in the parent folder of SPLIT) having the values of the key column like this (so basically I need to replace the number with something meaningful):
Company.txt:
103|US100E1
104|US100E1
105|US100E1
433|EMEAE1
- As you can see from the example the key is not unique, multiple values might be merged to one based on the keys above Note: I'd prefer to have this file without the ".txt" which is needed for the output but I am happy to rework the Company.txt if the script is easier that way.
It is possible to have a second step which finds the filename by key and does the merger deleting the old files, but it would be more elegant to do in first step "simply" replacing the target file name from the second file. I failed both methods, but I'm fine with whichever is simpler/faster.
So the split must be based on the value from column 11 of the original file(s) and the filename on the second file. There can be more source files, they must append, and the split files may contain more than one of the key fields depending on the filename assignment.
Company.txt and extract_GL2* files are in the same folder, the split files need to go to a SPLIT subfolder.
A little code (the part I am unable to do are only pseudo, but can't test the rest either):
#!/bin/bash
while read line; do
company="${line|awk -F\| '{print $11}'}"
newfilename="${cat Company.txt | grep $company | awk -F\| '{print $2}' | head -1}" + ".txt"
_replace chr(34) to space in $line_
_replace , to space in $line_
_replace | to , in $line_
echo "$line" >> "SPLIT\$newfilename.txt"
done < "extract_GL2_*.txt"
Many thanks: Tamas
I have big 100+ page tif files and would like to be able to split it at a specified page.
there are excellent tools for doing this with pdfs. I'm looking for something similar for tif images, both GUI and command line solutions.