10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
For the record, I already tried telling mgmt and the users to disallow spaces in filenames for this script, but it isn't happening for a number of ID10T-error-based reasons.
I have simple list of 3 files in a directory that are named like this:
bash-3.2$ ls -1 file*
file1
file1 part2... (2 Replies)
Discussion started by: ckmehta
2 Replies
2. UNIX for Dummies Questions & Answers
I have simple test.sh script, see below:
bill_code=`echo $record | awk -F"|" '{print $1}'`
Fullname=`echo $record | awk -F"|" '{print $3}'`
email=`echo $record | awk -F\ '{print $4}'`
The last field contains spaces: see csv below:
A0222|Y|DELACRUZ|-cc dell@yahoo.com-cc support@yahoo.com
... (9 Replies)
Discussion started by: quay
9 Replies
3. Shell Programming and Scripting
hi
i have a file which store some data.the contents of my file is
data1:data2
data3:data4
i have a script which read this file
correct="$(cat /root/sh | cut -d: -f1)"
i used this syntax..please help me which syntax is used to read blank spaces.and then remove it and after that how to read... (1 Reply)
Discussion started by: shubhig15
1 Replies
4. UNIX for Dummies Questions & Answers
Hi
I am a newbie to unix. I have a current script that reads a directory for excel files and renames the files. There is a problem now because some of the files have spaces. If I put quotes on the file, it will work but I dont know how to read all the files with quotes.
Variables
$1 =... (6 Replies)
Discussion started by: Lillyt
6 Replies
5. UNIX for Dummies Questions & Answers
Hi,
Is it possible to include files (print with EOF, sort of like ssi) in perl/cgi?
Thanks (1 Reply)
Discussion started by: marringi
1 Replies
6. Shell Programming and Scripting
I am wondering how I can include external files in a perl script. I'm currently working on a website, and I'd like to put my menu items in a subroutine for example, and put that in another file such as menu.pl. That way, I can call the subroutine from each page (such as news.pl), and if I want to... (2 Replies)
Discussion started by: LNC
2 Replies
7. UNIX for Dummies Questions & Answers
Hi All,
I have a script that reads a file and echo it back to std out.
Test.txt
1aaaaaaaaaaa .
The script is ReadLine.sh
#!/bin/ksh
cat $1 | while read file
do
echo $file
done
I invoke the script as ReadLine.sh Test.txt
The output that I get is (1 Reply)
Discussion started by: aksarben
1 Replies
8. Shell Programming and Scripting
I need to tweek my awk output:
#cat filename
ab cd ef:ghi:jk lm:nop qrs
#cat filename | awk '{ for(i=3;i<NF+1;i++) printf $i}'
ef:ghi:jklm:nopqrs
I would like the ouput to include the original spaces from columns 3 on:
ef:ghi:jk lm:nop qrs
any suggestions? (4 Replies)
Discussion started by: prkfriryce
4 Replies
9. Shell Programming and Scripting
Hi
The following command read a string from the keyboard & echo it back.
$ read S;echo "$S"
ABCD
ABCD
As you see, the input has space. while it echo back the spaces are removed. Is there a way to keep the input intact and not removing any spaces? Also, the number of spaces may vary.
... (3 Replies)
Discussion started by: azmathshaikh
3 Replies
10. Programming
I am using the C compiler included with AIX 4.3.3. I am unable to include libraries when I try to create the executable. Is there a switch that has to be used at compile time to make this happen??
Can anyone help?? (2 Replies)
Discussion started by: andrewl68
2 Replies