10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hi, I have collection of letters in a column such as:
AA5678
AA9873434
..
..
I am trying to find the number of charecters in each.
"echo "AA5678"|wc -c
7----------------> why does it give 7 instead of 6? (6 Replies)
Discussion started by: kvosu
6 Replies
2. Shell Programming and Scripting
I have a sample server name listed in variable as below:
var="server-13"
I need to check if the 7th character on $var is number 1
whichenv=`echo "$var"| head -c 7 | tail -c 1`
if ]; then
echo "9 found"
else
echo "9 Not Found"
fi
Output:
This works... (3 Replies)
Discussion started by: mohtashims
3 Replies
3. Shell Programming and Scripting
I have a unix shell script generate.sh that writes to a file hello.txt using redirect.
For example:echo " Today's report shows progress by: " > hello.txt
This hello.txt is then send as an email body to the recipients.
My requirement is to have this special characters(up arrow and down arrow... (6 Replies)
Discussion started by: mohtashims
6 Replies
4. UNIX for Dummies Questions & Answers
Hi All,
I am having a file with the delimiter '|^'.
File name:test_dlim.csv
I want to cut the first field of this using awk command.
I tried with the help of the following link:... (2 Replies)
Discussion started by: boopathyvasagam
2 Replies
5. Shell Programming and Scripting
Hi,
Using perl, how can I delete a charecter (specify the position number), in a line which starts with "GETR P" and another line starting with "GET P:=". This needs tro be done for many charecters in a line
Thanks
Vijayalakshmi (2 Replies)
Discussion started by: abc_81
2 Replies
6. Shell Programming and Scripting
Hi,
I have file which is having the following content.
11082202^M
10951265^M
11482003^M
12820986^M
11309561^M
11092815^M
11103308^M
13024722^M
11343958^M
11280355^M
7516723^M
i want to delete the last charecter "^M" from all the line and redirect to other line.
Please help... (1 Reply)
Discussion started by: shivanete
1 Replies
7. Shell Programming and Scripting
how could find charecter from its ascii value.
please suggest me any code for that.
thannks in advance. (2 Replies)
Discussion started by: rinku
2 Replies
8. Shell Programming and Scripting
Hi...
I have a requrement to compare two files.
for e.g.
File 1
2007/08/19 09:48:10 DH-032 $APTA1: Device AATD8029
2007/08/19 09:48:10 DH-045 $APTA1: Device AATD8029
2007/08/19 09:48:10 DH-043 $APTA1: Device AATD8029
File 2
2007-08-19 09:48:10 DH-032... (1 Reply)
Discussion started by: evvander
1 Replies
9. Shell Programming and Scripting
I wannt to cut first char of any string.
str=A2465443
out put will be.
str1=A
str2=2465443.
I tried
str2=${?%srt}
str1=${str#$str2}
it is not working. (6 Replies)
Discussion started by: rinku
6 Replies
10. UNIX for Dummies Questions & Answers
Hi,
My file looks like
abc$%sdfhs$%sdf$%sdfaf$%
here as seen delimiter is $%...now how cas i take out second field as cut command expect delimiter as single charecter only.....is there is any other way
thanks and regards
mahabunta (9 Replies)
Discussion started by: mahabunta
9 Replies