Sponsored Content
Homework and Emergencies Homework & Coursework Questions Can someone please help me? (An example of how not to post homework.) Post 302390794 by andrew1400 on Friday 29th of January 2010 03:10:20 AM
Old 01-29-2010
Can someone please help me? (An example of how not to post homework.)

Hi,
when I run ls -l I get the following command (I already know ls) :

Code:
rwxrwxrwx 2 andrew andrew 4096 2010-01-25 22:00 test.txt
rwxrwxrwx 2 andrew andrew 4096 2010-01-25 21:01 test1.txt
rwxrwxrwx 3 andrew andrew 4096 2010-01-25 20:45 test2.txt
rwxrwxrwx 1 andrew andrew 4096 2010-01-25 01:12 test3.txt
I want to write a bash program that uses : cut, grep, sed and pipes
and makes the output asfollow (I know ls give me the name only,but i have to use ls -l):

Code:
-test.txt
-test1.txt
-test2.txt
-test3.txt
(there has to be a "-")


what should I use(I just know I should use the pipe):
ls -l |
Please note that "uses : cut, grep, sed and pipes" must be used
 

4 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Can someone please help me? (Another example of how not to post homework.)

Hi, when I run ls -l I get the following command (I already know ls) : rwxrwxrwx 2 andrew andrew 4096 2010-01-25 22:00 test.txt rwxrwxrwx 2 andrew andrew 4096 2010-01-25 21:01 test1.txt rwxrwxrwx 3 andrew andrew 4096 2010-01-25 20:45 test2.txt rwxrwxrwx 1 andrew andrew 4096 2010-01-25 01:12... (6 Replies)
Discussion started by: andrew1400
6 Replies

2. Post Here to Contact Site Administrators and Moderators

Help with deleting post, apologies about the earlier post.

Apologies about the earlier post, i didnt realise, could i delete that post? I apologise again, SynGc (1 Reply)
Discussion started by: SynGc
1 Replies

3. Post Here to Contact Site Administrators and Moderators

Do I post to Homework forum if learning on own

Quick question, I'm learning shell scripting on my own from resources like the 'Teach Yourself' books, web sites, etc. If I have any questions about these materials, do I still need to post them to the homework section? The template asks specific things like school associated with or... (7 Replies)
Discussion started by: Chasman78
7 Replies

4. Post Here to Contact Site Administrators and Moderators

Apparently my post is Homework/Classwork?

I previously posted a question in the Shell Scripting forum a few minutes ago. I recieved a message telling me I had breached a rule, apparently because my post was a homework infraction. Well, im currently trying to figure out how to use Raspberry Pi's (as im a starter) I asked one of my... (1 Reply)
Discussion started by: Waggie14
1 Replies
WDMD(8) 						      System Manager's Manual							   WDMD(8)

NAME
wdmd - watchdog multiplexing daemon SYNOPSIS
wdmd [OPTIONS] DESCRIPTION
This daemon opens /dev/watchdog and allows multiple independent sources to detmermine whether each KEEPALIVE is done. Every test interval (10 seconds), the daemon tests each source. If any test fails, the KEEPALIVE is not done. In a standard configuration, the watchdog timer will reset the system if no KEEPALIVE is done for 60 seconds ("fire timeout"). This means that if single test fails 5-6 times in row, the watchdog will fire and reset the system. With multiple test sources, fewer separate failures back to back can also cause a reset, e.g. T seconds, P pass, F fail T00: test1 P, test2 P, test3 P: KEEPALIVE done T10: test1 F, test2 F, test3 P: KEEPALIVE skipped T20: test1 F, test2 P, test3 P: KEEPALIVE skipped T30: test1 P, test2 F, test3 P: KEEPALIVE skipped T40: test1 P, test2 P, test3 F: KEEPALIVE skipped T50: test1 F, test2 F, test3 P: KEEPALIVE skipped T60: test1 P, test2 F, test3 P: KEEPALIVE skipped T60: watchdog fires, system resets (Depending on timings, the system may be reset sometime shortly before T60, and the tests at T60 would not be run.) A crucial aspect to the design and function of wdmd is that if any single source does not pass tests for the fire timeout, the watchdog is guaranteed to fire, regardless of whether other sources on the system have passed or failed. A spurious reset due to the combined effects of multiple failing tests as shown above, is an accepted side effect. wdmd will exit if a watchdog driver is not loaded. wdmd cannot be used on the system with any other program that needs to open /dev/watchdog, e.g. watchdog(8). Test Source: clients Using libwdmd, programs connect to wdmd via a unix socket, and send regular messages to wdmd to update an expiry time for their connection. Every test interval, wdmd will check if the expiry time for a connection has been reached. If so, the test for that client fails. (Other test sources such as scripts executed each test interval may be added in the future.) OPTIONS
-D Enable debugging to stderr and don't fork. -H num Enable (1) or disable (0) high priority features such as realtime scheduling priority and mlockall. Default 1. 2011-08-01 WDMD(8)
All times are GMT -4. The time now is 08:07 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy