I would 1st change the commas and blanks that don't belong to the string into newlines so that every string is on a separate line and then pipe them into a while/read loop, where I can do something with every single line that is being processed:
As example I just added that "bla" in front of every read line. You can do something else inside that while loop that would make more sense of course. If it is just for formatting text you could maybe just do it all in sed or awk etc.
I have a script that converts a file into an html table. This script works fine for a 1 column table. However, I'm trying to do this for a multi-column table. My input file will look something like this:
a b c
d e f
g h i
My script basically works by taking in each line and putting that... (2 Replies)
Hi All,
I know there's a really simple answer to this but I just can't think of it :)
I'm processing a file which has lines containing white space i.e.
And I want to perform some awk on each line but when I do the following:
for US in $( cat /tmp/unique-strings.tmp | sed 's/\/\\]/g'... (6 Replies)
Hi All
I need to put a bunch of specific files in a directory (with loads of other files), into a tar archive. The best way I thought of doing this was putting the filenames into a file, reading them line by line in a for loop, and then adding them to a tar acrhive.
However the filenames have... (6 Replies)
I have a file with the following contents
# more hello.txt
man
hello man
whereru
The shell script i have tries to echo the contents of the file hello.txt
for i in `cat hello.txt`
do
echo $i
done
but the output i am getting is taking the space as a new line..
#... (3 Replies)
Hi Everyone!
I want to build sql inserts from a list of countries/regions saved in a file. The list looks like this:
United Kingdom
Czech Republic
...
The script I run is:
while read i;
do
var=`expr $var + 1`;
echo "INSERT INTO calltypes VALUES($var, '$i','$i');" >>... (5 Replies)
How do I loop thru space separated values in a variable?
I hate to use very complicated counter increment logic for this kind of simple problem.
Expected result(using ksh)
$>echo "aaa bbbb cccc" | <looping code here>
var=aaa
var=bbbb
var=cccc
$>echo "aaa bbbb cccc" | while IFS=" "... (12 Replies)
I have a loop like
while read i
do
echo "$i"
.
.
.
done < tms.txt
The tms.txt contians data like
2008-02-03 00:00:00
<space>00:00:00
.
.
.
2010-02-03 10:54:32 (2 Replies)
Hi,
I am having a file say list1 with a output like below
jun 12 18:23
may 20 18:23
Now i want to pass the above two values into for loop,I have written a script like this.
#!/bin/bash
a=`cat list1`
for i in $a
do
echo "HI $i"
done
expected output:
HI jun 12 18:23 (3 Replies)
Hi All
I have a source file named ABC-20150613 to 20150613.zip. I was trying to execute the below command on this source file, but its telling file is not available in that path and giving me some random file names.
ls -ltr| for z in ABC-????????*to*????????*.zip
do unzip $z -d
done
I... (5 Replies)
Discussion started by: ginrkf
5 Replies
LEARN ABOUT OSF1
clientwhitepointofccc
DisplayOfCCC(3X11)DisplayOfCCC(3X11)NAME
DisplayOfCCC, VisualOfCCC, ScreenNumberOfCCC, ScreenWhitePointOfCCC, ClientWhitePointOfCCC - Color Conversion Context macros
SYNOPSIS
DisplayOfCCC(ccc)
XcmsCCC ccc;
VisualOfCCC(ccc)
XcmsCCC ccc;
ScreenNumberOfCCC(ccc)
XcmsCCC ccc;
ScreenWhitePointOfCCC(ccc)
XcmsCCC ccc;
ClientWhitePointOfCCC(ccc)
XcmsCCC ccc;
ARGUMENTS
Specifies the CCC.
DESCRIPTION
The DisplayOfCCC macro returns the display associated with the specified CCC.
The VisualOfCCC macro returns the visual associated with the specified CCC.
The ScreenNumberOfCCC macro returns the number of the screen associated with the specified CCC.
The ScreenWhitePointOfCCC macro returns the screen white point of the screen associated with the specified CCC.
The ClientWhitePointOfCC macro returns the client white point of the screen associated with the specified CCC.
SEE ALSO XcmsCCCofColormap(3X11), XcmsConvertColors(3X11), XcmsCreateCCC(3X11), XcmsDefaultCCC(3X11), XcmsSetWhitePoint(3X11)
Xlib -- C Language X Interface
DisplayOfCCC(3X11)