How to run one command inside another command in Linux?

0 votes
Hi Team.

I have one requirement to run more than one command at a time in the bash shell. How can I do that?
Oct 14 in Linux Administration by akhtar
• 33,370 points
45 views

1 answer to this question.

0 votes

Hi@akhtar,

You can run multiple commands in your bash shell. In this scenario, you need to use backquote as shown below. 

$ ps -o rss `pgrep python3`

This command will find the process ID of the python3 program. Then it will find the resident set size of the process.

answered Oct 14 by MD
• 79,190 points

Related Questions In Linux Administration

0 votes
1 answer

How to create nested directories with a single command in linux?

Try this command. mkdir -p /parent_dir/son_dir READ MORE

answered Oct 19 in Linux Administration by anonymous
• 19,570 points
29 views
–1 vote
1 answer

How to get octal file permission in linux?

You can use this: stat -c "%a %n" ...READ MORE

answered Jan 3, 2019 in Linux Administration by Omkar
• 69,030 points
491 views
0 votes
1 answer

How to create a symlink in Linux?

To create a symbolic link, you can ...READ MORE

answered Jan 31, 2019 in Linux Administration by Omkar
• 69,030 points
187 views
0 votes
1 answer

How to collect all output in one file?

You can use 2> to redirect it: foo ...READ MORE

answered Mar 1, 2019 in Linux Administration by ajs3033
• 7,280 points
105 views
0 votes
1 answer
0 votes
1 answer

What is the difference between ctrl z and ctrl c in command line?

Hi@akhtar, Generally, these two commands are used to ...READ MORE

answered Feb 24 in Linux Administration by MD
• 79,190 points
3,029 views
0 votes
1 answer

not able to run netstat-tnlp in Linux.

Hi@akhtar, In Linux system netstat-tnlp command comes from ...READ MORE

answered Apr 16 in Linux Administration by MD
• 79,190 points
104 views
0 votes
1 answer

How to break root password in CentOS/RHEL 8?

Hi@akhtar, Reboot the system and interrupt the boot ...READ MORE

answered May 11 in Linux Administration by MD
• 79,190 points
141 views
0 votes
1 answer

How to create one new partition in my hard disk in Linux?

Hi@akhtar, To create new partition you can follow ...READ MORE

answered Apr 7 in Linux Administration by MD
• 79,190 points
95 views
0 votes
1 answer

How to create one crontab job in Linux?

Hi@akhtar, To configure crontab in your system, you ...READ MORE

answered May 13 in Linux Administration by MD
• 79,190 points
113 views