9 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi everyone, first time visitor to these forums here.
Keeping a long story short I've been attempting to learn how to code in bash. I have VERY little previous experience with coding languages besides simply copying and pasting batch scripts for Windows. So, with that in mind I've followed a... (4 Replies)
Discussion started by: Meta
4 Replies
2. UNIX for Dummies Questions & Answers
I am a beginner and have recently started to study unix. I checked some of the posts on this forum just to check if a new member like me can easily be guided and found it very interesting. This seems like a great place where i can get answer to my doubts and questions.
I checked the thread for... (1 Reply)
Discussion started by: kaal
1 Replies
3. HP-UX
Hello All,
I am working in HP unix since 5 years on application and support. But in order to get opportunity out side i need to learn admintration Can somebody help me to guide hot start for this. Do we have any doc(pdf) to start with.
Thanks
Krsnadasa (1 Reply)
Discussion started by: krsnadasa
1 Replies
4. UNIX for Dummies Questions & Answers
I am trying to get better at UNIX, and I wanted to post a question so I can take some advice from more experienced programmers. What are some things that you wished you knew (while you were learning UNIX) that you think every beginner should know? (2 Replies)
Discussion started by: statichazard
2 Replies
5. Shell Programming and Scripting
how do i implement a script that asks user to input a word. it should ask for input a word continuously until the word is longer than 5 characters then stop.
this is what i have so far
#!/bin/bash
read -p "enter word" word1
while ; do
echo "continue"
done (4 Replies)
Discussion started by: marcusstar10
4 Replies
6. What is on Your Mind?
Hello folks. I am new to Unix / Linux and this forum and wanted to introduce myself. Currently I work as a system analyst on an old IBM S/390 mainframe system with Sun and SGI at the peripheral that runs the heart of the space surveillance system for the US Air Force. I hear that our future... (2 Replies)
Discussion started by: dbeck
2 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I am a beginner and I want to learn Unix, so I want to buy a good unix books. Here's a few books that I think can be useful, but I nned you suggestion and comments.
1. Beginning UNIX by Wrox
2. Mastering Unix by Katherine Wrightson, Joseph Merlino, ..
3. Unix in a Nutshell, Fourth... (1 Reply)
Discussion started by: wizzkid
1 Replies
8. UNIX for Dummies Questions & Answers
Due to my new job I need to learn Unix to advance in the company and I am mainly a windows and mac user. What is a good book to get me started on the right path and hopefully prevent me from wasting money on several books and weeks of reading. Any response is welcomed thanks in advance. (3 Replies)
Discussion started by: windowsux
3 Replies
9. UNIX for Dummies Questions & Answers
Hi my name is Jenny.
I'm a very very big beginner with UNIX.
I've made Forms on my website, but need to add CGI to compliment them.
Presently, I don't have a host that supports UNIX.
Is there anywhere I can connect to a UNIX session for free?
If so, will they most likely have the latest... (2 Replies)
Discussion started by: JennyW
2 Replies
split(n) Tcl Built-In Commands split(n)
__________________________________________________________________________________________________________________________________________________
NAME
split - Split a string into a proper Tcl list
SYNOPSIS
split string ?splitChars?
_________________________________________________________________
DESCRIPTION
Returns a list created by splitting string at each character that is in the splitChars argument. Each element of the result list will con-
sist of the characters from string that lie between instances of the characters in splitChars. Empty list elements will be generated if
string contains adjacent characters in splitChars, or if the first or last character of string is in splitChars. If splitChars is an empty
string then each character of string becomes a separate element of the result list. SplitChars defaults to the standard white-space char-
acters.
EXAMPLES
Divide up a USENET group name into its hierarchical components:
split "comp.lang.tcl.announce" .
-> comp lang tcl announce
See how the split command splits on every character in splitChars, which can result in information loss if you are not careful:
split "alpha beta gamma" "temp"
-> al {ha b} {} {a ga} {} a
Extract the list words from a string that is not a well-formed list:
split "Example with {unbalanced brace character"
-> Example with {unbalanced brace character
Split a string into its constituent characters
split "Hello world" {}
-> H e l l o { } w o r l d
PARSING RECORD-ORIENTED FILES
Parse a Unix /etc/passwd file, which consists of one entry per line, with each line consisting of a colon-separated list of fields:
## Read the file
set fid [open /etc/passwd]
set content [read $fid]
close $fid
## Split into records on newlines
set records [split $content "
"]
## Iterate over the records
foreach rec $records {
## Split into fields on colons
set fields [split $rec ":"]
## Assign fields to variables and print some out...
lassign $fields
userName password uid grp longName homeDir shell
puts "$longName uses [file tail $shell] for a login shell"
}
SEE ALSO
join(n), list(n), string(n)
KEYWORDS
list, split, string
Tcl split(n)