10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I'm trying to print calendar using shell script and i'm able to print it. But the format is not good.
Here is the script.
#!/bin/bash
echo $(date)
echo "Hello $USER"
echo Hostname $(hostname)
echo Working in $(pwd)
echo Here is this month calender
echo $(cal)
$ sh first.sh... (7 Replies)
Discussion started by: chandrakanth
7 Replies
2. Shell Programming and Scripting
Hi Gurus,
I have some weird issue. when using
ls -l
the result shows different time format:
-rw-r--r-- 1 abc gourp1 3032605576 Jun 14 2013 abc
-rw-rw-r-- 1 abc gourp1 1689948832 Aug 10 06:22 abc
one display 2013 which is year; another one displays 06:22 which is time.
... (4 Replies)
Discussion started by: ken6503
4 Replies
3. Shell Programming and Scripting
Hi Guys,
I want to echo last 5 lines of a file to a mail. My script getting continuously looped and not getting the output. can anyone help?
#!/bin/bash
read karthick;
tail -5 $karthick;
echo $karthick | mail -s "genius" someone@gmail.com
Thanks
NK (2 Replies)
Discussion started by: Karthick N
2 Replies
4. UNIX for Dummies Questions & Answers
how do i Display only the first two characters of all the lines from a file.? (1 Reply)
Discussion started by: ritusubash
1 Replies
5. Shell Programming and Scripting
Hello All,
I have a file whose data looks something like this
I want to extract just the id, name and city fields in a csv format and sort them by id. Output should look like this.
1,psi,zzz
2,beta,pqr
3,theta,xyz
4,alpha,abc
5,gamma,jkl (12 Replies)
Discussion started by: grajp002
12 Replies
6. Shell Programming and Scripting
Hi,
I have written a perl script to dispaly some statements from a file but i want the output statements to be dispalyed in an HTML format.Is it possible for me to do in perl scripting?
Please help me with ur thoughts.
Thanks In Advance
Meva. (1 Reply)
Discussion started by: meva
1 Replies
7. Shell Programming and Scripting
Following are the lines from /etc/sudoers.conf
bob SPARC = (OP) ALL : SGI = (OP) ALL
fred ALL = (DB) NOPASSWD: ALL
ALL CDROM = NOPASSWD: /sbin/umount /CDROM,\
/sbin/mount -o nosuid\,nodev /dev/cd0a /CDROM
Could you please help me with shell/perl script to display the records
with... (2 Replies)
Discussion started by: Ujan
2 Replies
8. UNIX for Dummies Questions & Answers
I have an input file which looks like this:
601 a
602 a
603 a
601 b
610 c
615 c
603 d
601 d
612 d
I need the utput to look like this
601 a 602 603
602 a 601 603
603 a 601 602
601 b
610 c 615
615 c 610
603 d 601 612 (1 Reply)
Discussion started by: wahi80
1 Replies
9. Shell Programming and Scripting
Hi
to all in this great forum, im sure this has been asked lots of times before but ive been looking for the past day and cant find the answer.
I use cat/some/file to display its contents but how can i get it to not display hashed out lines, or do i need another command,
Thanks in advance:) (5 Replies)
Discussion started by: dave123
5 Replies
10. UNIX for Dummies Questions & Answers
Hi,
If I want to have a look at few lines of the file, how do I, what command to use.
Eg: If I have a file having length 2000 lines and I want to have a look at the content between 1400 and 1600, How do I look at it ?
Also, If I want to have a look at function alone in a file, how do I go... (4 Replies)
Discussion started by: sharuvman
4 Replies