I am trying to assign a awk array for further processing later in the script. I can't seem to figure it out. If someone could look at this and help me, I would very much appreciate it.
Thanks in Advance.
for ( x = 1 ; x <= Var ; x++ ) {
if ( x in varr ) {
... (2 Replies)
Hi,
i want awk to read a file and place it's content into two arrays. When trying to read these arrays with a "for a in ${source_path} "-Loop it gives the right result. But when trying to access directly (/bin/echo ${source_path}) it doesn't work.
I read "all "the awk threads in this forum and... (6 Replies)
Is there a way to retain the awk array in the shell.
My requirement
file a.txt
A B Count
10 1 25
10 2 20
10 3 21
11 1 20
11 2 22
12 2 40
12 3 15
A and B are my variables and count... (6 Replies)
I want to ask the user to enter an X amount of file names. I want to put those names into an array and then loop back through them to verify they are in the directory. 1st- How would I assign the value to an array and what is the correct syntax. 2nd- how would i reference that array after I... (3 Replies)
file.txt : is delimiter:
abc:def:ghi
jkl:mno: pqr
123:456:789
if I do the cut command, and cut the first column, and echo it out
I will get the output:
abc
jkl
123
How can I assign the column of text that I've cut into Array?
e.g If I were to echo array array it will output as:... (9 Replies)
Hi,
I have a piece of code as follows:
i=0
while read LINE
do
var = "$LINE"
i=$((i+1))
echo "${var}"
done < file
I want to assign value to the array var.
However, when i execute the script i get a error.
Please can you help me know what i am missing.
I ultimately want to... (2 Replies)
Hi all ,
I have a string like para1#para2#para3
i want to assign para1 as first element para2 as second and so on
i tried
IFS=#
set -A array para1#para2#para3
echo ${array}
para1 para2 para3
i want echo ${array}
para1 (2 Replies)
Hi,
I have a 10*10 two dimensional array. How do I assign value to all it's 100 elements at once? I don't want to open two for loops and assign one by one.
Thanks,
Shuri (1 Reply)
Discussion started by: shurimano
1 Replies
LEARN ABOUT DEBIAN
plan9-split
SPLIT(1) General Commands Manual SPLIT(1)NAME
split - split a file into pieces
SYNOPSIS
split [ option ... ] [ file ]
DESCRIPTION
Split reads file (standard input by default) and writes it in pieces of 1000 lines per output file. The names of the output files are xaa,
xab, and so on to xzz. The options are
-n n Split into n-line pieces.
-l n Synonym for -n n, a nod to Unix's syntax.
-e expression
File divisions occur at each line that matches a regular expression; see regexp(7). Multiple -e options may appear. If a subex-
pression of expression is contained in parentheses (...), the output file name is the portion of the line which matches the subex-
pression.
-f stem
Use stem instead of x in output file names.
-s suffix
Append suffix to names identified under -e.
-x Exclude the matched input line from the output file.
-i Ignore case in option -e; force output file names (excluding the suffix) to lower case.
SOURCE
/src/cmd/split.c
SEE ALSO sed(1), awk(1), grep(1), regexp(7)SPLIT(1)