Bert-Schuurman

Mission Specialist
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2024
01:24 PM
- 524 Views
RH124 - ch05s06 - 2.3 not working
Dear ROL Support,
When following 2.3 i get the error message.
Error:
[student@servera 13:16:03 ~] $ rm $file
rm: missing operand
Try 'rm --help' for more information.
Cloud you investigate it ?
4 Replies
melhouderi

Cadet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2024
01:30 PM
- 515 Views
Did you assign properly the value for the variable $file ?
It seems the value is empty. Try an echo $file to get it's value
Bert-Schuurman

Mission Specialist
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2024
02:39 PM
- 494 Views
[student@servera ~]$ ls -l $file -rw-r--r--. 1 student student 0 Jan 23 14:59 tmp.zdkei083
Bert-Schuurman

Mission Specialist
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2024
02:40 PM
- 494 Views
The varible look up works fine.


Starfighter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2024
07:04 PM
- 472 Views
It's probably too late, but could you post the results of the history command?
You should have done this (Note: there is NO SPACE on each side of the =
[student@servera 14:47:05 ~]$ file=tmp.zdkei083
then
[student@servera 14:48:35 ~]$ echo $file
tmp.zdkei083
then
[student@servera 14:59:07 ~]$ ls -l $file
-rw-r--r--. 1 student student 0 Jan 23 14:59 tmp.zdkei083
then
[student@servera 14:59:10 ~]$ rm $file
alternatively, to use verbose mode
[student@servera 14:59:10 ~]$ rm -v $file
removed 'tmp.zdkei083'
So I just did it and it worked fine:
Program Lead at Arizona's first Red Hat Academy, est. 2005
Estrella Mountain Community College
Estrella Mountain Community College
Join the discussion
You must log in to join this conversation.