Search Results

Search: Posts Made By: dude_me5
5,759
Posted By Perderabo
What language? What OS? I can't read that Greek...
What language? What OS? I can't read that Greek stuff. :confused:
#! /usr/bin/ksh
IFS=":"
exec < inputfile
while read loginname fullname shell id ; do
echo loginname = $loginname
...
5,759
Posted By Perderabo
bash and ksh are pretty close. Just change the...
bash and ksh are pretty close. Just change the first line to #! /bin/bash
5,759
Posted By Corona688
${VAR:0:1} will eval to the first letter in the...
${VAR:0:1} will eval to the first letter in the VAR variable in BASH and newer versions of ksh (ksh88/pdksh is too old, which causes much consternation). Sorry for the slow answer but you ran afoul...
22,187
Posted By summer_cherry
can use awk
Hi,
I think you can use AWK.(I am a newer also):p

awk 'BEGIN{
i=1
}
{var[++i]=$0}
END{
for (a in var)
print var[a]
}'

Pls try!
10,927
Posted By sb008
#!/usr/bin/ksh # reading content of file...
#!/usr/bin/ksh

# reading content of file into arrays
INDEX=0
while read NAMES[${INDEX}] NUMBERS[${INDEX}]
do
((INDEX=$INDEX+1))
done < <inputfile>

#displaying values in each array
for...
1,877
Posted By alister
You could replace cut -d ":" -f 2with sed...
You could replace
cut -d ":" -f 2with
sed 's/[^:]*://; s/^ symbolic link to.*/ symbolic link/'In all cases, it removes everything up to the first colon, inclusive. In the case of symbolic link,...
Showing results 1 to 6 of 6

 
All times are GMT -4. The time now is 07:51 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy